Modify ↓
Ticket #11705 (closed bug: invalid)
binding to form submit buttons (in ajaxed-in forms)
| Reported by: | svenfranck@… | Owned by: | |
|---|---|---|---|
| Priority: | undecided | Milestone: | None |
| Component: | unfiled | Version: | 1.7.1 |
| Keywords: | Cc: | ||
| Blocking: | Blocked by: |
Description
I have a form which I'm ajax-loading into the page.
If I try to bind to the form submit button like this:
var trigger = form.find('input[type="submit"]');
$(document).on('click.formSubmit', trigger, function(){
console.log("click");
})
every click on a link element anywhere on the page triggers this event.
If I do the "old way":
trigger.live('click.formSubmit', function(){
console.log("mh");
})
only the clicks on the submit button are registered.
Change History
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.
Note: See
TracTickets for help on using
tickets.

Please read the documentation or ask for help on the forum.