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:|
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