Hi Chris - I added this in because users were looking for a way to prevent a triggered click from occurring. Once I added it, however, I realized that it was completely out-of-line with the HTML spec.
So, on this point, it'll probably be going away. That'll solve your problem, but the problem of stopping a triggered event still exists. I think we may have to add a parameter to trigger that allows you to only trigger the event handlers on an element - and not the default action. We'll have to look into this some more. --John On 1/30/07, Chris Domigan <[EMAIL PROTECTED]> wrote: > 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 > http://www.trendskitchens.co.nz/jquery/trigger.html > > Any help would be appreciated, > > Cheers, > > > Chris > > > > _______________________________________________ > jQuery mailing list > discuss@jquery.com > http://jquery.com/discuss/ > > > _______________________________________________ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/