简体   繁体   English

Infinite Carousel无法在IE中正确加载,可以在Chrome,Safari和FF中使用

[英]Infinite Carousel not loading properly in IE, works in Chrome, Safari, and FF

Hey guys, I run a store on BigCartel.com. 大家好,我在BigCartel.com上经营一家商店。 Recently I decided to incorporate a jQuery slider onto my store. 最近,我决定将jQuery滑块合并到我的商店中。 I chose this rather than flash so that it would be compatible with Apple mobile devices for my customers. 我选择了此产品而不是闪存,以便它可以为我的客户与Apple移动设备兼容。 Unfortunately, I've run into some issues getting it to work in IE. 不幸的是,我在使其在IE中工作时遇到了一些问题。 At this point it works perfectly in Chrome, FF, and Safari, the other major browsers I'm worried about. 此时,它可以在我担心的其他主要浏览器Chrome,FF和Safari上完美运行。 I figured I might be able to track down some effective help here, rather than banging my head against the wall continuing to try to figure this out. 我认为我可以在这里找到一些有效的帮助,而不是将我的头撞在墙上继续尝试找出答案。

You can see my website at www.StarboardClothing.com . 您可以在www.StarboardClothing.com上查看我的网站。 The slider I am using is named "Infinite Carousel" and is available here on Catch My Fame . 我使用的滑块名为“无限轮播”,可在“ 抓住我的名声”中找到

Here is the code that I'm currently using: 这是我当前正在使用的代码:

In the section of my layout page, which is applied to all other pages on the site I have the following code. 在布局页面的这一部分(适用于网站上的所有其他页面)中,我具有以下代码。


{% if page.permalink == 'home' %}

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

<script type="text/javascript">
  $.noConflict();
</script>

<script type="text/javascript"> 
jQuery(function(){
jQuery('#carousel').infiniteCarousel({
    transitionSpeed: 2000,
    displayTime: 6000,
    inView:1,
    advance:1,
    imagePath: 'http://sliderfiles.starboardclothing.com/',
    textholderHeight : .25,
    padding:'10px',
    autoHideCaptions: true,
    prevNextInternal: true,
    displayThumbnailNumbers: false,
    displayThumbnailBackground: false,
    thumbnailWidth: '10px',
    thumbnailHeight: '10px',
    autoHideControls: true,
    displayProgressBar: false,
    easeLeft: 'swing',
    easeRight: 'swing'

});
jQuery('div.thumb').parent().css({'margin':'0 auto','width':'60px'});
jQuery('#carouselWrapper > div:eq(1)').css('margin-top','56px');
jQuery('#carouselWrapper > div:eq(2)').css('margin-top','56px');
});
</script>

{% endif %}

I then include the following code on my site in the section where I am actually implementing the plugin. 然后,在我实际实现插件的部分中,在我的网站上包含以下代码。 The is what has allowed it to be somewhat functional in IE. 是什么使得它在IE中有些功能。 Prior to adding that wrapper, it was not functioning in IE at all. 在添加该包装之前,它根本无法在IE中运行。 At this point it is only minimal function, and the plugin breaks down after one play through. 在这一点上,它只是最小的功能,并且插件在播放一遍后就会崩溃。 None of the controls currently work in IE despite being functional in the other major browsers. 尽管可以在其他主要浏览器中运行,但这些控件当前都无法在IE中运行。


<div class ="iframe-wrapper">

<div id="carousel">
<ul>
<li><a href="http://www.starboardclothing.com"><img alt="" src="http://sliderfiles.starboardclothing.com/annapolis-splash3.jpg" width="648" height="302" /></li>        
<li><a href="http://www.starboardclothing.com/artist/spring-line-2011"><img alt="" src="http://sliderfiles.starboardclothing.com/spring-line.jpg" width="648" height="302" /></li>

</ul>
</div>
</div>

If anyone could help me get this working in IE, I'd be extremely grateful. 如果有人可以帮助我在IE中工作,我将非常感激。 I know it's possible to get working in IE. 我知道可以在IE中工作。 Part of the reason why I picked this plugin in particular is that it was functional in IE on the creator's website. 我之所以特别选择此插件的部分原因是,它在创作者网站上的IE中具有功能。 I'll be happy to try to implement any suggestions you may have and let you know the results. 我很乐意尝试实施您可能有的任何建议,并让您知道结果。 Thanks ahead of time. 提前谢谢。

It seems to work in IE9, at least on my machine. 至少在我的机器上,它似乎可以在IE9中工作。 IE9 does, however, throw a 'Syntax Error' on line 1, column 1 of ?live-comment-preview.js (note the question mark): IE9确实会在?live-comment-preview.js 1行第1列上引发“语法错误”(请注意问号):

There's a link in there to http://www.catchmyfame.com/?live-comment-preview.js which should probably really point to http://www.catchmyfame.com/live-comment-preview.js : 那里有一个指向http://www.catchmyfame.com/?live-comment-preview.js的链接,它可能实际上应该指向http://www.catchmyfame.com/live-comment-preview.js

<p style="display: none;"><input type="hidden" id="akismet_comment_nonce" name="akismet_comment_nonce" value="48264cb9eb" /></p><script src="http://www.catchmyfame.com/?live-comment-preview.js" type="text/javascript"></script><div id="commentPreview"></div>

I no longer have access to IE versions older than IE9, so can't help you with those — it could be that this syntax error prevents older IEs from loading your carrousel. 我不再可以访问比IE9早的IE版本,因此无法为您提供帮助-可能是此语法错误阻止了较旧的IE加载您的轮播。

I tested the link on IE6,7,8. 我在IE6、7、8上测试了链接。 The slider works fine but they all throw an error on line 17: 滑块工作正常,但是它们都在第17行上引发错误:

<script type="text/javascript">

    <meta name="generator" content="Big Cartel" />
<script type="text/javascript">

      var _gaq = _gaq || [];
      _gaq.push(['_setAccount', 'UA-22000995-1']);
      _gaq.push(['_trackPageview']);

      (function() {
        var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
      })();

    </script>

You have a meta tag inside the script tag 您在脚本标签内有一个meta标签

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM