[jQuery] .trigger() behaviour - repost
Hi there
I posted about this a while ago but never got a response I could understand (probably my fault!).
My question relates to why using .trigger(), which as of 1.1 is supposed to trigger the browser's default behaviour, gives a different result to performing the triggered event manually.
An example:
If I click (manually) on a checkbox, the checkbox will be checked and then the attached handler will be executed. This is great - just what you would expect.
But if I do .trigger(#myCheckbox) things happen the other way around. The handler is called first and THEN the checkbox is checked.
Say I have logic in my handler that checks if the checkbox is checked or not, it will get a different result depending on if the action was done manually or via .trigger().
I have thrown up a test page at <a href="http://www.trendskitchens.co.nz/jquery/trigger.html">
http://www.trendskitchens.co.nz/jquery/trigger.html</a>
Any help would be appreciated,
Cheers,
Chris
_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/