title: Prev and next buttons to change divs
body: <p>I'm trying to create a code in jQuery that adds the class active to the next div and removes it from the previous div and vice versa with the previous. This all in mind with animations I want to add later.</p>
  
  <p>If you want to see the code with HTML and CSS:
  <a href="http://codepen.io/salman15/pen/kXVmRG?editors=1010" rel="nofollow">http://codepen.io/salman15/pen/kXVmRG?editors=1010</a></p>
  
  <pre><code>$(document).ready(function() {
      $('#next').click(function() {
          var location = $(this).parent().parent();
          $('.active').removeClass('active');
          $('div').next('#case').addClass('active');
      });
  
      $('#prev').click(function() {
          var location = $(this).parent().parent();
          $('.active').removeClass('active');
          $(this).prev('#case').removeClass('active');
      });
  });
  </code></pre>