开发者

Is jQuery 1.6.4 broken or did something change? [closed]

开发者 https://www.devze.com 2023-04-11 05:53 出处:网络
This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time,or an extraordinarily narrow situation that is not generally applic
This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center. Closed 11 years ago. 开发者_如何学运维

It works in jQuery 1.6.3 but not jQuery 1.6.4

http://jsfiddle.net/xxwr4/

$("#a").click(function(){
    alert("click");              
});

<a id='a' href="#">test</a>


This is jsFiddle's bad I believe, not jQuery.

I get an error when trying to attach to the window's load event. Something tells me they've pushed an un-tested update.

[11:01:16.970] window.addEvent is not a function @ http://fiddle.jshell.net/_display/:18

So, what's basically happening is your event isn't being attached because when it tries to bind your javascript code to execute after the DOM is ready it bombs. Switching to no wrap (body) in the fiddle allows it to work.


No, I think it's jsFiddle that's broken. If you switch it to "onDomReady" it works.


The issue is on jsfiddle's side. If you change it from onLoad to onDomReady it'll correct the problem.

0

精彩评论

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