I have written code like this to prevent form submit. But it is not working. What is the possible reason
$('#signUpForm').submit(function (event) {
debugger;
console.log('test');
event.preventDefault();
$('#signUpForm').unbind().submit();
//IsValid();
return false;
})
event.preventDefault();is correct. Have you got a fiddle, or something showing exactly what is not working?you cannot say that jQuery is JavaScript- getting way off-topic now, but you can, and I do. Every time you use jQuery, you're using javascript, not just in a narrow "technical" sense but in reality. The same with any JS library or framework.