//sample solution
$(document).ready(function(){
$('#button').click(function(){
var toAdd = $('input[name=checkListItem]').val();
//remember to add content to the input box and click on the Add button when testing
//$('.list').append('div').addClass('item').html(toAdd); //this should work too
$('.list').append("<div class='item'>" + toAdd + "</div>");
});
});
No comments:
Post a Comment