I'm using bxslider with captions only. Using CSS, I've stacked the captions on top of each another. What I want to do now is assign the active caption(or "slide") a class, so I can change its background color.
Could this be done using one of the bxslider callback functions (they're all listed out at http://bxslider.com/options)? I would think I could use getCurrentSlide to accomplish what I need, but I'm not exactly sure how to go about this.
Here's the HTML snippet for the slider.
<div class="bx-wrapper">
<div class="bx-viewport">
<ul class="bxslider">
<li>
<div class="imageContainer">
<a href="/">
<img src="">
</a>
</div>
<div class="captionContainer">
<p class="captionTitle">Some text</p>
<p class="captionBlurb">Some more text</p>
</div>
</li>
<li>
<div class="imageContainer">
<a href="/">
<img src="">
</a>
</div>
<div class="captionContainer">
<p class="captionTitle">Some text</p>
<p class="captionBlurb">Some more text</p>
</div>
</li>
<li>
<div class="imageContainer">
<a href="/">
<img src="">
</a>
</div>
<div class="captionContainer">
<p class="captionTitle">Some text</p>
<p class="captionBlurb">Some more text</p>
</div>
</li>
<ul>
</div>
</div>
I know I need to start off with something like...
slider = $('.bxslider').bxSlider();
var current = slider.getCurrentSlide();