Welcome to WuJiGu Developer Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
971 views
in Technique[技术] by (71.8m points)

jquery - Fancybox v.2.1.2 not opening on IE7

I am using Fancybox v.2.1.2 in Wordpress (not a plugin). In IE7, I have the loading but it does not opening anything at all.

Here is my JS code

<!-- Add fancyBox main JS and CSS files -->
<script type="text/javascript" src="/path/to/fancybox/source/jquery.fancybox.js?v=2.1.2"></script>
<link rel="stylesheet" type="text/css" href="/path/to/fancybox/source/jquery.fancybox.css?v=2.1.2" media="screen" />
<script>
jQuery(document).ready(function() {
     jQuery("a.fancybox").fancybox({
        padding : 0
    });  
});
</script>

And here is my code in my page :

<a href="/path/to/images/P1050615.jpg" class="fancybox" rel="gallery[283]"></a>
<div class="hidden">
 <a class="fancybox" href="/path/to/images/P1050616.jpg" rel="gallery[283]"><img src="/path/to/images/P1050616.jpg"></a>
 <a class="fancybox" href="/path/to/images/P1050617.jpg" rel="gallery[283]"><img src="/path/to/images/P1050617.jpg"></a>
</div>

I am using the HTML5 Doctype but even when I am changing it, it does not change anything.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

I am afraid that this is a bug (it's not your fault, it's not your code).

I have contacted directly the developer and he confirmed to me that the issue is expecting to be fixed in the next commit.

You may rollback to version v2.1.1 in the meantime.

UPDATE : Fancybox v2.1.3 has been released

Changelog Version 2.1.3 - October 23, 2012

  • Fixed #426 - Broken IE7
  • Fixed #423 - Background flickering on iOS
  • Fixed #418 - Automatically Grow/Shrink and Center
  • Updated the script to work with jQuery 1.6
  • Media helper supports YouTube video series

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to WuJiGu Developer Q&A Community for programmer and developer-Open, Learning and Share

2.1m questions

2.1m answers

62 comments

56.6k users

...