반응형
[출처] http://stackoverflow.com/questions/16905129/hide-pager-if-bxslider-has-only-1-slide
I faced the same trouble and here is my solution: we should count how many child elements we have under .bxslider2 block
$("#ticket-list li").length
and if there is only one, then set option to 'false', otherwise to 'true'.
$('.bxslider2').bxSlider({
mode: 'horizontal',
speed: '180',
pagerType:'full',
pager: ($("#ticket-list li").length > 1) ? true: false,
captions: false
});
Hope it will helps.
반응형
'개발일지 > JS' 카테고리의 다른 글
[jQuery] jquery timer, javascript countdown (타이머 예제) (0) | 2016.03.02 |
---|---|
[jQuery] Text Slider / Rotator (0) | 2016.01.12 |
[jQuery] Count-up Advanced Code (0) | 2015.10.22 |
[jQuery] Magnific popup conflict with "jquery.nicescroll" (0) | 2015.10.05 |
[jQuery] Count-Up Animation 성능 비교 (0) | 2015.10.02 |