Hi there

I'm aware .trigger() was patched in the recent 1.1.1 update, but I'm having
issues with it.

If I have a checkbox, then firing trigger("click") seems to fire the bound
"click" handler first, *before* unchecking the checkbox.

This is a pain cos say I have some code like this:

$("#myCheckbox").bind("click", function() {
 if (this.checked) {
   alert("Checked!");
 }
 else alert("Not checked!");
});

If I manually click on the checkbox to enable it, I get alert("Checked!").

But if I then fire $("#myCheckbox").trigger("click") then the handler fires
*first* (ie alert("Checked!")) and afterwards the checkbox unchecks itself.

Wouldn't it make more sense for the checkbox to be checked/unchecked first
before firing the handler?

Any help would be most appreciated.

Cheers,

Chris
_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/

Reply via email to