title: Jquery 2 Clicks function Animate
body: <p>I would like to make a div slide to the right on its first click and when its clicked again, I'd like it to return to the original position</p>
  
  <p>I have the following but the div doesnt move and console.log shows clicked-2 even on the first click.</p>
  
  <pre><code>$('.note-title').click(function(){
          console.log("clicked-1");
          $(this).animate({'margin-left':'200px'},200);
      },function(){
          console.log("clicked-2");
          $(this).animate({'margin-left':'0px'},200);
      }); 
  </code></pre>