0

NivoSliderをWebページの上部に適用しようとしています。テストページを作成しましたが、正常に機能しました。同じコードを使用して、実際のドキュメントのdivタグの1つにダンプしましたが、まったく表示されません。divタグは、いくつかのdivタグに含まれています。多分それが問題ですが、私は本当に知りません!助けが必要です。

JSフィドル

<link rel="stylesheet" href="nivo-slider.css" type="text/css" media="screen" />
<link rel="stylesheet" href="themes/default/default.css" type="text/css" media="screen" />
<script src="jquery.nivo.slider.pack.js" type="text/javascript"></script>

<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.8/jquery.min.js"></script>  

  <div class="slider-wrapper theme-default">
    <div id="slider" class="nivoSlider">
        <img src="images/toystory.jpg" alt="" />
        <a href="http://dev7studios.com"><img src="images/up.jpg" alt="" title="#htmlcaption" /></a>
        <img src="images/walle.jpg" alt="" title="This is an example of a caption" />
        <img src="images/nemo.jpg" alt="" />
    </div>
</div>
<div id="htmlcaption" class="nivo-html-caption">
    <strong>This</strong> is an example of a <em>HTML</em> caption with <a href="#">a link</a>.
</div>


  </div>

体の終わり

<script type="text/javascript">
$(window).load(function() {
    $('#slider').nivoSlider();
});
</script>
4

1 に答える 1

1

スクリプト src の順序がバランスが取れていません。jquery を上に、スライダーを下に置き、動作するかどうかを確認する必要があります。

<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.8/jquery.min.js"></script>

<script src="jquery.nivo.slider.pack.js" type="text/javascript"></script>
于 2012-11-17T03:52:56.190 に答える