I have a form with submit button. It was working correctly. However now it has stopped working, please help.
$('#btnsubmit').click(function() {
$(this).delay(2000).animate({
width: '90px'
},
'slow',
function() {
alert('Im an alert message');
}
);
});
I think your form is getting submitted. You need to prevent the default action of submit button using e.preventdefault()
Like
$('#btnsubmit').click(function(e) {
e.preventdefault();
$(this).delay(2000).animate({
width: '90px'
},
'slow',
function() {
alert('Im an alert message');
}
);
});