title: Adding a integer to a css class with jQuery
body: <p>This is the code I have, now what it needs to do is increase the integer after the class name 'icon-' so that on each click the 'icon-' class gets a higher integer value ex. click -> 'icon-2', click -> 'icon-3' and so forth.</p>
  
  <p>Bare in mind that the current icon shown to the user is 'icon-1'.</p>
  
  <p>Also, is there a way for me to alert if it hits 'icon-10' or prevent it from trying to go further than 'icon-10' or below 'icon-1'.</p>
  
  <pre><code>    $(function () {
          a = 2,
          b = '',
  
          $('.icon-step-backward').click(function(){      
              $('#slider').removeClass();
              $('#slider').addClass('icon-' - a);
          });
  
          $('.icon-step-forward').click(function(){
              $('#slider').removeClass('icon-');
              $('#slider').addClass('icon-' + a);
          });
      });
  </code></pre>