title: BX slider. Adding and removing class to previous slides
body: <p>I am trying to add a class to each slide navigation bullet that is before the current slide.</p>
  
  <p>Right now it adds a class if you click the next button. However I cant figure out how to remove the class when the previous button is clicked.</p>
  
  <p>Something along the lines of</p>
  
  <pre><code>$(document).ready(function($) {
  
      slider = $('.slider').bxSlider({
  
      onSlideBefore: function(){
  
       var current = slider.getCurrentSlide();
        if (slide-data-index &lt;= current) {
          $('.bx-pager .bx-pager-item a').addClass('past');
        } else {
          $('.bx-pager .bx-pager-item a').removeClass('past');
      }
  });
  </code></pre>
  
  <p>This is what I have working so far: <a href="http://jsfiddle.net/mreee/xVnQY/" rel="nofollow">http://jsfiddle.net/mreee/xVnQY/</a></p>
  
  <p>I cant figure out assign a variable for slides</p>