title: Add class to prev and next element of current element
body: <p>I would like to create a carousel and for that I would like to add prev and next class to current li.</p>
  
  <p>My active class work fine in my list but I </p>
  
  <pre><code>&lt;div id="carrousel"&gt;
    &lt;ul&gt;
      &lt;li&gt;&lt;/li&gt;
      &lt;li&gt;&lt;/li&gt;
      &lt;li class="prev_slide"&gt;&lt;/li&gt;
      &lt;li class="active"&gt;&lt;/li&gt;
      &lt;li class="next_slide"&gt;&lt;/li&gt;
      &lt;li&gt;&lt;/li&gt;
      &lt;li&gt;&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>My problem is that I don't know how to delete prev_slide and next_slide each time the li.active change. Each time remove prev and next class to the active class.
  And at the end of my list add next_slide to the first element etc...</p>
  
  <pre><code>jQuery('#carrousel ul').find('li.active').prev().addClass('prev_slide');
  jQuery('#carrousel ul').find('li.active').next().addClass('next_slide');
  </code></pre>
  
  <p>Thanks in advance for your help</p>