Slimbox 2 插件、jQuery Flickr 和 IE8
我目前正在开发一个使用两个 jQuery 插件的网站:
第一个插件用于从特定帐户提取 flickr 照片。这些照片在页面上显示为缩略图。然后,我使用第二个插件来显示这些图像的更大视图。
因为 flickr 照片是在页面加载时获取的,所以我像这样调用 Slimbox2 函数:
$(document).ready(function() {
$("#Flickr").flickr(); //Call Flickr plugin
$(window).bind('load', function() {
$("#Flickr a").slimbox();//Call Slimbox2
});
});
在第一次测试中,这似乎工作得很好。我测试了FireFox、IE7、IE6和Safari的多个版本。一切都很棒。但是,Slimbox 灯箱效果在 IE8 中不起作用。但是,如果我将 IE8 置于兼容模式,一切都会按预期运行。我想避免强制兼容模式。
没有 JavaScript 错误,我对测试不知所措。以下是示例链接:
http://www.njhall.com/ JRMcCourt-Builders/index.html#ourwork
任何建议将不胜感激。
谢谢 缺口
I am currently developing a site that I make use of two jQuery plugins:
The first plugin is used to pull in flickr photos from a specific account. These photos are displayed as thumbnails on the page. I am then using the second plugin to display larger views of these images.
Because the flickr photos are fetched when the page loads, I am calling the Slimbox2 function like this:
$(document).ready(function() {
$("#Flickr").flickr(); //Call Flickr plugin
$(window).bind('load', function() {
$("#Flickr a").slimbox();//Call Slimbox2
});
});
On first testing this seemed to have worked perfectly. I tested multiple versions of FireFox, IE7, IE6, and Safari. Everything is great. However, the Slimbox lightbox effest does not work in IE8. However, if I put IE8 into compatibility mode, everything works as expected. I would like to avoid forcing compatibility mode.
There are no javascript errors and I am at a loss for testing. Here is a link to a sample:
http://www.njhall.com/JRMcCourt-Builders/index.html#ourwork
Any advice would be greatly appreciated.
Thanks
Nick
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我目前在 IE8 中遇到“$(window).bind('load', function() {”问题。基本上,在我正在处理的页面上,它在 IE8 中永远不会触发。在 IE9、Firefox 中工作正常在 IE8 中不会发生
这种情况(引入多个 jQuery 插件、ASP.NET ModalPopupExtenders、Facebook、Twitter 和 YouTube 等),所以我不确定。可能会妨碍 IE8 触发“加载”功能。
目前不确定这是否对您有帮助,但我想我会发布它,以防它在某些时候确实对某人有帮助。
I'm currently having trouble with "$(window).bind('load', function() {" in IE8. Basically, on the page I'm working on, it never fires in IE8. Works fine in IE9, Firefox, Chrome, etc. Just doesn't happen in IE8.
This is on a pretty complicated page (pulling in multiple jQuery plugins, ASP.NET ModalPopupExtenders, Facebook, Twitter, and YouTube stuff etc.), so I'm not sure exactly what might be getting in the way of IE8 firing the "load" function.
Not sure if this will help you at this point, but thought I'd post in case it does help someone at some point.