English 中文(简体)
jQuery Coda Slider IE 6,7 Crashing when switching tabs...I hate IE
原标题:

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">&#171; 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 &#187;</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.

最佳回答

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.

问题回答

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:

$( div#coda-slider-1 ).codaSlider

to

$( #coda-slider-1 ).codaSlider




相关问题
Image rendered with wrong colors in IE8

I have a gradient image as a PNG (no transparency) in a web-page. By taking a screenshot of Chrome showing the page and cropping the image from the page, I see the exact same colors are drawn as the ...

Determine Mobile Internet Explorer version

I need to determine the version of Mobile Internet Explorer on a Windows Mobile 6.1 device. So that I can report the same user-agent string as is being used by Mobile Internet Explorer. The user-...

CSS working only in Firefox

I am trying to create a search text-field like on the Apple website. The HTML looks like this: <div class="frm-search"> <div> <input class="btn" type="image" src="http://www....

Internet Explorer only part loading JavaScript/CSS

I m having trouble with my local development environment where IE (6 through to 8) is only part loading JavaScript/CSS files. It throws random errors at random places in jquery.min.js every time I ...

IE doesn t run Javascript when you click back button

I ve built a shop with tons of JS running. One of the pieces of the cart, is a zip code field which is required to calculate shipping cost. This works fine going through the cart. Now clicking ...

热门标签