1
をホバーボタンをは継続的に私は、ナビゲーションボタンを推移しているときは常に連続してスクロールするカルーセルを必要とする...私はjCarouselプラグインを使用していると私は、道路のバンプを打ってきた
をjCarouselをスクロールします。組み込みの設定変数を "mouseover"に変更すると、ホバー一回だけスクロールします。
私はthis similar questionに出くわしましたが、私はjavascriptのエキスパートではなく、答えを得ることができません。すべてのヘルプははるかに高く評価されるだろう
function mycarousel_initCallback(carousel)
{
// Pause autoscrolling if the user moves with the cursor over the clip.
carousel.clip.hover(function() {
carousel.stopAuto();
}, function() {
carousel.startAuto();
});
};
jQuery(document).ready(function() {
jQuery('#mycarousel').jcarousel({
auto: 10,
start: 1,
scroll: 1,
animation: 'slow',
wrap: 'circular',
buttonNextEvent: 'mouseover',
buttonPrevEvent: 'mouseover',
initCallback: mycarousel_initCallback
});
});
:
は、ここに私のコードです。
ここで、カルーセルが表示されている.htmlファイルにこのスクリプトを挿入しますか?さらに、 'buttonNextEvent'と 'buttonPrevEvent'は 'mouseover'ではなく 'click'に設定する必要がありますか? –