Klaus Hartl schrieb:
> Klaus Hartl schrieb:
>> With jQuery 1.1, trigger does not execute a click event on a checkbox I 
>> have attached before...
>>
>> Is it just me?
> 
> Hm, actually that's a problem of the new feature that click() will also 
> trigger the click function for the checkbox.
> 
> See here:
> http://stilbuero.de/demo/jquery/trigger.html
> 
> The bound click handler gets called twice when using trigger, thus it 
> seemed to me it wasn't firing at all (because in my case a cloned 
> checkbox got checked and immediatly unchecked again).
> 
> This can be handled by returning false in the handler function, but this 
> is ugly because then I have to check the checkbox manually via 
> JavaScript. Sigh, I didn't like that feature from the beginnning...

Nope. The following doesn't work (Firefox 2):

$('input').bind('click', function() {
     this.checked = !this.checked;
     alert('I have been clicked.');
     return false;
});

Maybe I don't get it.


-- Klaus



_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/

Reply via email to