Ticket #11602 (closed bug: duplicate)
Triggering click event on checkbox using .click() behaves differently to when it is clicked on by the user
| Reported by: | alexgt20052000@… | Owned by: | |
|---|---|---|---|
| Priority: | undecided | Milestone: | None |
| Component: | unfiled | Version: | 1.7.2 |
| Keywords: | Cc: | ||
| Blocking: | Blocked by: |
Description
Hello,
I am building a generic select-all checkbox where clicking it switches all the other checkboxes in the same table column.
In order to increase the hit-box of the checkbox, I made it so that clicking the parent td of the select-all checkbox would simply trigger a click event on the checkbox itself. However, by triggering the event in this way the order in which the checkbox is ticked/unticked, and then the event handlers are activated, seems to be reversed. For a trimmed down example, please see http://jsfiddle.net/hwTXM/12/
Tested in chrome, firefox and IE 7-9.
Thanks, Alex Jeffrey
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.
