1
$(document).ready(function() {
2
var doc_w = $(document).width();
3
var cnt_vis = 5;
4
var scroll = 2;
5
if(doc_w<=550){
6
cnt_vis = Math.floor(doc_w/120);
7
if(cnt_vis<3){
8
scroll = cnt_vis;
9
}else{
10
scroll = 3;
11
}
12
}
13
14
var carousel1Options = {
15
btnPrev: function() {
16
return $(this).find('.prev-prev');
17
},
18
btnNext: function() {
19
return $(this).find('.next-next');
20
},
21
visible: cnt_vis,
22
scroll: scroll,
23
/*auto: 1,*/
24
speed: 400,
25
circular: true,
26
autoWidth: true,
27
responsive: true,
28
btnDisabledClass: "active",
29
init: function(opts, lis) {
30
if (lis.length <= opts.visible) {
31
opts.visible = lis.length;
32
$(this).find('.prev-prev').css('display', 'none');
33
$(this).find('.next-next').css('display', 'none');
34
}
35
}
36
};
37
38
if(doc_w<=550){
39
$('.maingoods20_1').css("display", "block");
40
$('.maingoods20_1').jCarouselLite(carousel1Options);
...
</html>