开发者

What combination of jQuery libraries dont work in IE and other browsers

Just found this combination doesn't work for IE 7.0.6001.18000

<link media="all" type="text/css" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.10/themes/base/jquery-ui.css" rel="stylesheet">

<link media="all" type="text/css" href="http://static.jquery.com/ui/css/demo-docs-theme/ui.theme.css" rel="stylesheet">

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"></script>

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.10/jquery-ui.min.js"></script>

The ui libraries just throw errors. And $(document).ready(function(){ alert(':('); }); produces nothing

UPDATE: --------------------------------------------------------------

Okay I lied! (duh) - what happens to the enthusiastic but tired dev eyes.

So real question is why does the code below work 开发者_如何转开发in Firefox and not IE

 $(document).ready(function(){ 

 $('<img/>').attr('src','images/someRealPic.gif').load(function(){
 alert('here');  
 }); });


you may want to check to see if a given issue has been reported in the bugtracker, http://bugs.jqueryui.com/report/3 , if in this case, the issuse exists in 1.?.?.? but not in 1.?.?.(?+1) then it's something that has been corrected in the newer version, and you should likely be using either the newer version or a baked older version if it's an issue for you. That's the purpose of the versioning system, bug will happen and will be addressed by a newer version, and the code in the older version will be left as it was. follow the changelog when versions come out to see if they address any specific issues you may have with a previous version.

The simple why is, no dev team is perfect, people like you and me will find bugs, report them, and the devs will push out a new build with our reported bugs fixed.


The code you added creates an image and doesn't actually attach the image anywhere so the load event will never fire. The syntax for load is:

$('img').load(function(){});

I could be wrong but I don't think that having it in the ready function will work as when the ready function fires your image will have already loaded and you would have to add an $('img').trigger('load'); in the ready event for the image to load event to fire from within the ready function. Apparently the jQuery load event won't fire if the image is cached so that is also an added issue. You might try the imagesLoaded() plugin that checks when a given image is loaded:https://gist.github.com/268257.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜