开发者

jQuery 1.6.1 with jquery UI tabss causes onclick to fire?

开发者 https://www.devze.com 2023-03-06 11:08 出处:网络
I just upgraded to jQuery 1.6.1 and noticed that when I select a tab in jQuery UI it fires any onclick events that I may have in html. In previous versions of jQuery this did not happen. I was wonderi

I just upgraded to jQuery 1.6.1 and noticed that when I select a tab in jQuery UI it fires any onclick events that I may have in html. In previous versions of jQuery this did not happen. I was wondering if something has changed in jQuery for this to happen.

An example of this is here:

Exampe of problem: http://jsfiddle.net/fUas6/2/

  • Simply change the refence to jquery 1.5.2 and you will see the event doesn't fire

If I bind click event using jQuery $("foo").bind("click"..... th开发者_Python百科en the event is not fired

So I'm guessing by design jQuery fires native onclick events?

Regards DotnetShadow


It probably depends on the browser, But inline code takes priority over header code...

It was more of a bug to prevent it firing in the previous version of jQuery...


jQuery UI is not jQuery :-) They are developed by separate teams and is likely that a new version of jQuery will not be 100% backwards compatible. I would try the latest release (and even the development builds) and, if it is still a problem, make the jQuery UI team aware of your issue by raising a bug.

0

精彩评论

暂无评论...
验证码 换一张
取 消