title: How to chain multiple click events on same element in JQuery?
body: <p>I want to have an event fire on one click of an element, and then a different event on a second click of the same element. I've attached a demo link below. The problem is that the events are being chained so that one click runs through to the last event without waiting for the second click. I'm sorry if this is a duplicate, but I cannot find the same issue on this board.</p>
  
  <p>I probably haven't worded the question very well, and I'm sure I'm going to get into trouble for it...</p>
  
  <pre><code>$(function(){
  l $('.box')
        .click(function() {
          $(this).removeClass('red'
                          ).addClass('black');
        })
        .click(function() {
          $(this).removeClass('black'
                          ).addClass('blue');
        });
  });`
  </code></pre>
  
  <p><a href="http://jsfiddle.net/MEFNG/1/" rel="nofollow">http://jsfiddle.net/MEFNG/1/</a></p>