I know:
$('form').one('submit', function (evt) { ... });
I know:
$('form').live('submit', function (evt) { ... });
Does it exists the combination of both?
Thanks.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can delegate the event higher up the DOM tree:
Note that this is only available in jQuery 1.7+. It takes the same form as the
onmethod. This works because DOM events tend to bubble up the tree. If you bind the event handler to an ancestor element, it will eventually reach it. The 2nd argument is a selector. When the event reaches the ancestor, the target is checked against the selector. If it matches, the handler is executed.