stevenwanderski / bxslider-3

jQuery custom content slider
http://bxslider.com
447 stars 101 forks source link

option on bxslider #228

Closed jbecha closed 10 years ago

jbecha commented 10 years ago

Hi everyone, I want to know if, in bxslider, it's possible to have, at the same time, the next/prev controls under the slide and the navigation arrows. It seems that you cannot have both. Or, another solution, is it possible to click on the image to go to the next or prev slide ? Here is an example of what I want to do : http://peterzeglis.com/ Many thanks for your help !

jbecha commented 10 years ago

Finally, I found how to do what I wanted. Here is the code I use:

var slider = $('.bxslider').bxSlider({ mode: 'fade', pager: true, pagerType: 'short', adaptiveHeight: true, touchEnabled: true, });

$('#slider-next').click(function(){ slider.goToNextSlide(); return false; });

$('#slider-prev').click(function(){ slider.goToPrevSlide(); return false; });

$('#slider-count').click(function(){ var count = slider.getSlideCount(); alert('Slide count: ' + count); return false; });

Then I replaced the image "controls.png" by transparent gif and changed the css code of bxslider. Thanks.