1

jqueryslideToggleをFirefoxで動作させました。それが下にスライドするとき、パフォーマンスがどういうわけかびくびくするので、それは完璧ではありません。私はさまざまな回避策を試しましたが、誰もその権利を助けませんでした。

したがって、最初の質問は、私のコードでこの小さなジャンプを引き起こす可能性があるものです。

そして、より大きな問題はIEでの表示です。IE6およびIE7。非表示のdivは、初期ポーズのIEでは非表示になりません。そして、スライドも奇妙に振る舞います。

誰かが私をこのshから救ってくれることを願っています......

Firefoxで私のサイトにアクセスしてください。

http://www.haus-plan.de/_01_Hausplan/

確認してからIE6&7と比較してください。

ソースコードには、firefoxまたはfirebugからアクセスできます。

どなたでもお役に立てれば幸いです。

ここに私のjqueryコード:

$(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");
});

});

4

1 に答える 1

0

要素の幅を強制するだけです!

<li><a href="#" id="sombra" onclick="$('#opt_1').slideToggle(360);">MUEBLES</a>
              <!-- just have to force the width of the elemet! -->
              <ul id="opt_1" style="display:none; width:164px;">

              <li id="imagen_superior"></li>
              <li><a href="salones-en-madrid-capital.php">SALONES</a></li>
              <li><a href="dormitorios-de-matrimonio-en-madrid-capital.php">DORMITORIOS</a></li>
              <li><a href="dormitorios-juveniles-en-madrid-capital.php">JUVENILES</a></li>
              <li><a href="muebles-de-cocina-en-madrid-capital.php">COCINAS</a></li>
              <li><a href="cuartos-de-bano-en-madrid-capital.php">BAÑOS</a></li>
              <li><a href="muebles-auxiliares-en-madrid-capital.php">AUXILIARES</a></li>
              <li><a href="sofas-en-madrid-capital.php">SOFÁS</a></li>
              <li><a href="mesas-en-madrid-capital.php">MESAS</a></li>
              <li><a href="sillas-en-madrid-capital.php">SILLAS</a></li>
              <li><a href="colchoneria-en-madrid-capital.php">COLCHONES</a></li>
              <li id="imagen_inferior"></li>
            </ul>

于 2011-06-14T15:13:49.677 に答える