jQuery Coda Slider IE 6,7 切换选项卡时崩溃...我讨厌 IE
首先,我想提一下我对 Internet Explorer 的绝对仇恨以及它给我带来的悲伤。
好的,我正在为客户网站使用 Coda 滑块,该网站位于:www.onlineuticacollege.com/david
以下是我对 Coda 滑块的声明。
<script src="tabbed-bottom-nav/js/jquery-1.3.2.min.js" type="text/javascript"></script>
<script src="tabbed-bottom-nav/js/jquery.easing.1.3.js" type="text/javascript"></script>
<script src="tabbed-bottom-nav/js/jquery.coda-slider-2.0.js" type="text/javascript"></script>
<script type="text/javascript">
$().ready(function() {
$('div#coda-slider-1').codaSlider({
dynamicArrows: false,
autoHeight: false
});
});
</script>
我实际的尾声滑块选项卡太大,无法放入帖子中,因此这里有一个指向其粘贴箱的链接:http:// /pastebin.com/m6f250b9d
但这里是总体布局:
<div class="panel"><!--Begin Contact Us: panel-->
<div class="panel-wrapper">
<h2 class="title">Tab Name</h2>
<p>Some text goes here</p>
<p>More text here.</p>
<div class="panelNavigation">
<a class="xtrig left" href="#4" rel="coda-slider-1" title="Go To Previous">« Previous</a>
<a class="center" href="contact-us/contact.asp" title="Learn More">Learn More</a>
<a class="xtrig right" href="#1" rel="coda-slider-1" title="Go To Next">Next »</a>
</div>
</div>
</div><!--End Contact Us: panel-->
现在,所有这些有时在 IE 6,7 中工作得很好,除非你在选项卡之间切换得非常快,其他时候切换到第一个选项卡时它完全崩溃...
非常感谢任何帮助或建议。
ps 我讨厌 Internet Explorer...
[编辑] 我已经让它在 IE 7 上完美地工作了...现在在 IE 6 上。
First off, I would just like to mention my absolute hatred of Internet Explorer and the grief it is causing me.
Okay, so I have am using a Coda slider for a clients website, located at: www.onlineuticacollege.com/david
Here is my declarations for my Coda Slider.
<script src="tabbed-bottom-nav/js/jquery-1.3.2.min.js" type="text/javascript"></script>
<script src="tabbed-bottom-nav/js/jquery.easing.1.3.js" type="text/javascript"></script>
<script src="tabbed-bottom-nav/js/jquery.coda-slider-2.0.js" type="text/javascript"></script>
<script type="text/javascript">
$().ready(function() {
$('div#coda-slider-1').codaSlider({
dynamicArrows: false,
autoHeight: false
});
});
</script>
My actual coda slider tabs are way too huge to fit in a post, so here's a link to a pastebin of it: http://pastebin.com/m6f250b9d
But here is the general layout:
<div class="panel"><!--Begin Contact Us: panel-->
<div class="panel-wrapper">
<h2 class="title">Tab Name</h2>
<p>Some text goes here</p>
<p>More text here.</p>
<div class="panelNavigation">
<a class="xtrig left" href="#4" rel="coda-slider-1" title="Go To Previous">« Previous</a>
<a class="center" href="contact-us/contact.asp" title="Learn More">Learn More</a>
<a class="xtrig right" href="#1" rel="coda-slider-1" title="Go To Next">Next »</a>
</div>
</div>
</div><!--End Contact Us: panel-->
Now, all of this sometimes works perfectly fine in IE 6,7 except if you switch between the tabs really fast, other times it completely crashes when switching to your first tab...
Any help or suggestions are GREATLY appreciated.
p.s. I hate internet explorer...
[edit] I have gotten it working perfectly on IE 7 somehow...now for IE 6.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
不确定这是否与之有关,但在查看他们的文档时,ID 引用的元素不需要在它们之前声明的元素类型。附带说明一下,这听起来像是 codaSlider 库中的一个错误。 JS 库的重点是使用一种语法约定,而库则处理跨浏览器实现。
如果你改变怎么办
:
Not sure if this has anything to do with it, but in looking at their documentation, elements referenced by IDs don't need the element type declared before them. As a side note, this sounds like a bug in the codaSlider library. The whole point of a JS library is to use one syntax convention, while the library handles cross-browser implementation.
What if you change:
to
所以这是一个相当复杂的问题,我终于在 IE 6 和 IE 7 上修复了它。
我最终所做的只是再次完全重新制作选项卡,这产生了良好的结果,它大部分都可以运行IE 7,但现在它让 IE 6 崩溃了。因此,我发现所有版本的 IE 都不能很好地处理具有 100% 宽度或适合选项卡内最大可能宽度的绝对宽度的选项卡(例如,您有一个宽度为 600 像素的选项卡,每边 5 像素的填充,您不能有一个宽度为 550 像素或更大的 div,这也适用于高度)
此外,如果您有多个浮动的 div 接近于等于宽度/height - padding/margin 添加在一起时会导致 IE 6 崩溃,但 IE 7 不会崩溃。
最后我不得不使用表格来排列两个不同的元素。我不一定想使用表格,但它确实完成了外观和功能,所以我对此感到很高兴。
希望这可以帮助以后的其他人。
So this is a rather complex problem, I have finally fixed it for both IE 6 and IE 7.
What I ended up doing was just completely remaking the tabs again, which yielded good results with it mostly functioning for IE 7, but now it left IE 6 crashing. So, I have found out that all versions of IE do not play well with anything withing the tabs having 100% width or an absolute width that fits the largest amount possible within the tabs (ex. You have a tab that's 600 pixels in width with 5px of padding on each side, you cannot have a div that is 550px or larger for the width, this also applies to the height)
In addition if you have multiple divs floating that come close to equaling the width/height - padding/margin when added together it will crash IE 6, but not IE 7.
In the end I had to use tables to arrange two of the different elements. I didn't necessarily want to use tables for it, but it did accomplish the look and the functionality, so I am glad for that.
Hopefully, this can help someone else later on.