2015-03-25 80 views
0

所以我想設置爲「自動」爲假時,在滑塊標記用戶點擊,這裏的代碼如下所示:如何更改按鈕的JavaScript滑塊選項單擊

$('#imageslider').bjqs({ 
    animtype  : 'fade', 
    height  : 698, 
    width   : 1920, 
    responsive : true, 
    automatic   : <?= $manualAdvancing ?>, 
    showcontrols : false, 
    animduration : 450, // how fast the animation are 
     animspeed  : <?= $delay ?>, 
}); 


$('.bjqs-markers li').click(function() { 

}); 

,所以當.click得到執行,automatic#imageslider.bjqs選項應設置爲false,我該怎麼做?

+0

我有檢查http://www.basic-slider.com/,它沒有提供任何方法來設置設置,即使不提供刪除滑塊,所以傾向於使用其他的jQuery滑塊 – 2015-03-25 12:33:25

回答

-1

你嘗試過:

var aut = <?= $manualAdvancing ?>; 
$('#imageslider').bjqs({ 
    animtype  : 'fade', 
    height  : 698, 
    width   : 1920, 
    responsive : true, 
    automatic   : aut, 
    showcontrols : false, 
    animduration : 450, // how fast the animation are 
    animspeed  : <?= $delay ?>, 
}); 


$('.bjqs-markers li').click(function() { 
aut=false; 
}); 
+0

謝謝,但這不起作用。 – Xeen 2015-03-25 12:19:08

0

訪問滑塊通過其ID,並試圖改變它的 「自動」 值。

$('.bjqs-markers li').click(function() { 
    var $slider = $("#imageslider"); 
    $slider.bjqs("automatic", false); 
});