stevenwanderski / bxslider-4

Responsive jQuery content slider
Other
4.22k stars 1.85k forks source link

Hide Pager and Navigation if only one page. #712

Open Tidal-Wave opened 9 years ago

Tidal-Wave commented 9 years ago

Was partially addressed in https://github.com/stevenwanderski/bxslider-4/pull/377 but there where issues still and am not sure it needs an option. Will look at making this automatic in update.

flowdee commented 9 years ago

For those who can't wait for the update, here's my solution which works like charm :)

var oneSlider = ($('#slider').children().length < 2);

$('#slider').bxSlider({
    auto: (!oneSlider),
    pager: (!oneSlider),
});
xxluke commented 9 years ago

I have an other easy solution with CSS:

.bx-pager-item:first-of-type:last-of-type { 
    display: none
}
r4fx commented 8 years ago

good one! :)

rajemahendra21 commented 8 years ago

Thank You for css

shashwat-p commented 7 years ago

var oneSlider = ($('#slider').children().length < 2);

$('#slider').bxSlider({ auto: (!oneSlider), pager: (!oneSlider), });

This worked!! :)

applibs commented 6 years ago

More clear is using CSS due resizing window.