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