//Sample Solution for script.js $('document').ready(function() { $('#changeButton').click(function() { //create a h1 with the class 'greeting' //inside of the div with id 'header' //(the message can be anything, or nothing, although thats lame) $myHeader = $('#header'); $myHeader.html('
Nothing
'); //create a div with the text contents //'inner-div' //inside of the div with id 'outer-div' $myDiv = $('#outer-div'); $myDiv.html('inner-div
');
$('body').append($myHeader);
$('body').append($myDiv);
});
});
No comments:
Post a Comment