Quotes help make search much faster. Example: "Practice Makes Perfect"

Thursday, November 8, 2012

Codecademy: Sample Solution to "Getting Pickyer"



//Sample solution to script.js
$('document').ready(function() {
$('#emptyTrash').click(function() {

//remove the element with id 'third-div'

var $divThird = $('#third-div');
$divThird.remove();

//remove all decendants of the element with id 'first-div'
//that have the class 'removeMe'; For this exercise put
//nothing in the actual remove() tag

var $divFirst = $('#first-div');
//Note: modify page.html since the class is listed as 'thing removeMe' insted of 'removeMe'
$divFirst.class('removeMe').remove();

});
});

No comments:

Post a Comment


This is an example of scrolling text using Javascript.

Popular Posts