반응형
[출처] 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.
반응형
'개발일지 > 2015' 카테고리의 다른 글
[HTML] Form inside a table (0) | 2015.12.17 |
---|---|
[Dev] mmt-donut-chart.js 개발일지 (0) | 2015.11.05 |
[CSS] ripple click effect (0) | 2015.11.03 |
[오픈소스] Apache, GNU, MIT 라이선스 (0) | 2015.10.26 |
[jQuery] Count-up Advanced Code (0) | 2015.10.22 |