开发者

Two slideshows with easy slider 1.7

I am using this http://cssglobe.com/post/5780/easy-slider-17-numeric-navigation-jquery-slider Easy slider 1.7 to achieve some slideshows on my website.

It works as it should, when there's only one slideshow. But I need to slideshows on the webpage at two different places. So, when I use the next/previous button, both slides move forward/backward.

I have created seprated IDs for the buttons of two divs. Also, the two divs have separate IDs.

Below code invokes the slide:

<script type="text/javascript"> $(document).ready(function(){

$("#slide1").easySlider({ auto: true, continuous: true }); $("#slide2").easySlider({ auto: true, continuous: true }); }); </script>

And in my javascript file, I have the following:

(function($) {

$.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'
    }; 

Can anyone help please?


$(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: ''
    });
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜