I’m trying to get jQuery to load a div from a page into a div with id of display. I’m able to do this using a link in a menu but not using a checkbox.
this is the code:
$(‘:submit’).click(function(e) {
if($(‘#coconuts’).is(‘:checked’)){
//alert(“coconuts is checked”);
$.get(‘theQuest.html’, function(data) {
$(‘#display’).html($(‘#coconuts’, data));
});
}
});
If I check coconuts then click the submit button the alert notifies me so I am getting that far. This is my project so far.
Final Project