2015-03-25 72 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); 
});