views:

509

answers:

0

Hi everyone, i got my jquery slideToggle working for Firefox. Ok it's not perfect, because when it slides down the performance is somehow jumpy. I tried different workarounds, but noone helped that right.

So first question is, what could cause this little jumpiness in my code.

And then the bigger problem is the display in IE. IE6 and IE7. The hidden divs are not hidden in IE in the initial pose. And the sliding acts strange, too.

I hope that someone can rescue me out of this sh......

Just visit my site with firefox:

http://www.haus-plan.de/%5F01%5FHausplan/

and check it and then compare it with IE6&7.

The source code is accessible with firefox or firebug.

I hope that anyone can help.

here my jquery code:

$(document).ready(function(){

//  Get height of all des before hide() occurs.  Store height in heightArray, indexed based on the de's position.
heightArray = new Array();
$("div.d_show_hide #de").each(function(i) {
  theHeight = $(this).height();
  heightArray[i] = theHeight;
});

// Hide all des
$("div.d_show_hide #de").hide();

//  When a tt is clicked, 
$("div.d_show_hide .tt").click(function () {
  //  Based on the tt's position in the div, retrieve a height from heightArray, and re-assign that height to the sibling de.
  $(this).next("#de").css({height: heightArray[$("div.d_show_hide .tt").index(this)]});
  //  Toggle the divideVisibility of the de directly after the clicked de
  $(this).next("#de").slideToggle("slow");
});

});