誰かが私を助けてくれる?残りのjQueryが要素のリストを構築する前に、.jshowoff-link
要素を隠す必要があります。私は最後に同じ要素を表示します。jQuery .show();関数は以前隠されたすべての要素を表示していません
リンク内の画像のリストを生成します。何らかの理由で、最初の画像とリンクのみを表示し、他の画像やリンクは表示しません。
私は.show();
関数の位置をスワップし、最後のif else
ステートメントの内側に追加しようとしましたが、どちらも機能しません。
.jshowoff();
ファンクショントリガーの前に表示される画像とリンクのリストを停止するためにこれがすべて実行されます。
私はすべてのアイデアがありません。誰でも助けることができますか?
// hide banners to begin with
$ ('.jshowoff-link').hide();
// this function wraps the elements in the neccessary tags to work with anything Slider
$ (document).ready(function() {
$('a.jshowoff-link')
.wrap('<li class="jshowoff-slide"></li>');
$('li.jshowoff-slide')
.wrapAll('<ul id="jshowoff"></ul>');
// figures out if there's more than one <li> being produced
if (banners.length > 1) {
// if so, build the jshowoff
$('#jshowoff').jshowoff({speed:7000, changeSpeed:1000, autoPlay:true, controls:true, links:true, animatePause:false, hoverPause:false });
}
else {
// if not, disable the function
$('#jshowoff').jshowoff({speed:7000, changeSpeed:1000, autoPlay:false, controls:false, links:false, animatePause:false, hoverPause:false });
}
// show the jshowoff after it's been built to stop flash of content on slow internet connections
$('.jshowoff-link').show();
return false;
});
私は[ 'ライブ()'](HTTPを使用してお勧めしたいです。 com/live /)が、どのイベントタイプを使用できるかはわかりません。 –