current slide

Prevent bxSlider stop auto

Prevent bxSlider stop auto slides transition, when navigating through slides.

	var slider = $('#slideshow').bxSlider({
		auto: true,
		stopAuto: false,
		startSlide: 0
	$(document).on('click','.bx-pager-link',function() {

How to add a class to the current slide in jQuery Cycle

I think that every web developer heard about jQuery Cycle plugin, and we all know that is the most simple to use, and the best regarding the options that it has, but that doesn’t mean is bullet proof. In some weird coincidence, I needed a css selector on the current slide ( something like class=”current” ), after I clicked “Inspect element”, I was surprised to find out that Cycle doesn’t have any kind of css selector on the slides ( what looney would need it ) ; so I start searching for a solution,  and that’s how we end up to the snippet of code bellow.

Here is the markup,

<ul id="slideshow">
           <img src="path-to-slide1.jpg" width="400" height="300" alt="" />
           <img src="path-to-slide2.jpg" width="400" height="300" alt="" />
     ... etc

and the js,

     fx: 'fade',
     speed: 'slow',
     timeout: 3000,
     before: function(){
      after: function(){

I still don’t think this is the best approach to this problem, but it works, and if you know a better way, please leave a comment.

Here you will find a demo, to see it in action.