How to reenable event.preventDefault?
Posted
by
Richbits
on Stack Overflow
See other posts from Stack Overflow
or by Richbits
Published on 2009-07-22T09:37:30Z
Indexed on
2011/11/19
17:51 UTC
Read the original article
Hit count: 261
JavaScript
|jQuery
I have a web page which I have prevented the default action on all submit buttons, however I would like to re-enable default submit action on a button how can I do this?
I am currently preventing the default action using the following:
$("form").bind("submit", function(e){
e.preventDefault();
});
I have successfully done this using the following:
$(document).ready(function(){
$("form:not('#press')").bind("submit", function(e){
e.preventDefault();
});
But can I do this dynamically when the button is clicked?
© Stack Overflow or respective owner