tags:

views:

57

answers:

1

I have a simple .slideToggle on my category headings on the website: http://www.UtahCodeCamp.com/Sessions/ :

// Slide Toggle the headers
$(".collapse-track").each(function () {
 $(this).click(function () {
  $(this).next().slideToggle();
 });
 $(this).css("cursor", "pointer");
 $(this).next().hide();
});

Everything works perfectly in FireFox and Chrome/Safari but in IE8 the parent div (with the yellow border in the bottom) will not resize. Then, if you expand all categoried and collapse them again the category titles sit right on top of each other.

Any ideas on how to fix this for IE8? I'm not as interested in compatability with IE6 or below, but I would like to support IE7/8.

+1  A: 

The problem you are experiencing isn't directly related to the jQuery slideToggle mehod. Instead it is due to one of your CSS rules. I used the developer toolbar to change the following:

.FloatLeft {
   width: 850px;
   /*display: inline-block;*/ /* This line was causing the problem */
}

I have not tested if this will effect Firefox or chrome though.

Waleed Al-Balooshi
Thanks a ton! You're awesome!! Sometimes this stuff gets so complex it's hard to figure out the real issue. Out of curiosity, do you know which browser was behaving incorrectly? Seems to me like this should broken all browsers?
Nate Zaugg
The problem where you expand all categories and collapse them again still kind of happens but it's not as bad now.
Nate Zaugg
I am sorry, I should have mentioned that I tried this on IE 8 only. I didn't test it on any other browsers to see if this change would break the page on them. I would recommend you check it on the other browsers you want your site to support. As for the being broken on all browsers, this is not always the case, because each could implement the CSS spec differently, which leads to inconsistencies in the rendering of the page on different browsers.
Waleed Al-Balooshi
@Nate Zaugg, sorry I am not sure what is causing that particular problem. You might want to ask it as another question, since it seems that the two problems you had were not related.
Waleed Al-Balooshi