0

このhttp://cssglobe.com/post/5780/easy-slider-17-numeric-navigation-jquery-slider 簡単なスライダー 1.7 を使用して、ウェブサイトでいくつかのスライドショーを実現しています。

スライドショーが 1 つしかない場合は、正常に機能します。しかし、ウェブページの 2 つの異なる場所でスライドショーを行う必要があります。そのため、次/前のボタンを使用すると、両方のスライドが前後に移動します。

2 つの div のボタンに個別の ID を作成しました。また、2 つの div には個別の ID があります。

以下のコードは、スライドを呼び出します。

<script type="text/javascript"> $(document).ready(function(){
$("#slide1").easySlider({ auto: true, continuous: true }); $("#slide2").easySlider({ auto: true, continuous: true }); }); </script>

私のjavascriptファイルには、次のものがあります。

(関数($) {

$.fn.easySlider = function(options){

    // default configuration properties
    var defaults = {            
        prevId:         'prevBtn',
        prevText:       'Previous',
        nextId:         'nextBtn',
        prevId1:        'prevBtn1',
        nextId1:        'nextBtn1', 
        nextText:       'Next',
        controlsShow:   true,
        controlsBefore: '',
        controlsAfter:  '', 
        controlsFade:   true,
        firstId:        'firstBtn',
        firstText:      'First',
        firstShow:      false,
        lastId:         'lastBtn',  
        lastText:       'Last',
        lastShow:       false,              
        vertical:       false,
        speed:          800,
        auto:           false,
        pause:          2000,
        continuous:     false, 
        numeric:        false,
        numericId:      'controls'
    }; 

誰でも助けてもらえますか?

4

1 に答える 1

0
$(document).ready(function () {
    $("#slider1").easySlider({
        auto: false,
        continuous: false,
        speed: 200,
        prevId: 'prevBtn1',
        nextId: 'nextBtn1',
        nextText: '',
        prevText: ''
    });

    $("#slider2").easySlider({
        auto: false,
        continuous: false,
        speed: 200,
        prevId: 'prevBtn2',
        nextId: 'nextBtn2',
        nextText: '',
        prevText: ''
    });
于 2011-11-03T07:33:43.633 に答える