JQuery code problem?
- by SLAPme
New to JQuery, I added the following JQuery code below and moved it around in my code and now it won't work I forgot what I did, can someone fix my code by placing the below code in its correct place thanks.
$('a').click(function () {
$('#changes-saved').remove();
});
return false; // prevent normal submit
});
JQuery code.
$(function() {
$('#changes-saved').hide();
$('.save-button').click(function() {
$.post($('#contact-form').attr('action'), $('#contact-form').serialize(), function(html) {
$('div.contact-info-form').html(html);
$('#changes-saved').append('Changes saved!').show().pause(1000).hide();
});
return false; // prevent normal submit
});
$('a').click(function () {
$('#changes-saved').remove();
});
return false; // prevent normal submit
});
});