title: Move div layer on click
body: <p>I made a small and simple code that moves a div layer 200 pixles up and down. But I want it to move the layer on click instead of mouseover. mouseleave is still ok! </p>
  
  <p>How do I do a check if the layer is up or down. I want to move the layer -200px only if the layer is up 200px.</p>
  
  <pre><code>&lt;script&gt;
    $(".block").mouseenter(function() {
     $(".block").animate({"bottom": "+=200px"}, 300);
    }).mouseleave(function() {
        $(".block").animate({"bottom": "-=200px"}, 200);
    });
  &lt;/script&gt;
  </code></pre>