//Sample Solution for script.js
$('document').ready(function() {
$('#changeButton').click(function() {
var $divToInsertInside = $('#insertHere');
//append a div with content 'append' and class 'appended'
//to $divToInsertInside using .append
$divToInsertInside.append('<div class="appended">append</div>');
//prepend a div with content 'prepend' and class 'prepended'
//to $divToInsertInside using .prepend
$divToInsertInside.prepend('<div class="prepended">prepend</div>');
});
});
No comments:
Post a Comment