title: Avoid repeated .click() in jQuery
body: <p>I have a jQuery script that triggers a click based on scroll position. I want to be able to click this element again if the user returns to the top of the page so the contact form will hide itself. Problem is that it creates a loop. </p>
  
  <pre><code>    jQuery(window).scroll(function (event) {
          var y = $(this).scrollTop();
          if (y &gt; 400) {
          $("#contactable-inner").click();
          $("#contactable-inner").unbind('click');}
      });
  </code></pre>
  
  <p>You can go here to see what I am working on: <a href="http://algk.me" rel="nofollow">http://algk.me</a></p>
  
  <p>UPDATE:</p>
  
  <pre><code>    $(window).scroll(function(){
          var y = $("body").scrollTop();
          var hidden = $('.hidden');
          if (y &gt;= 1000 &amp;&amp; (hidden.hasClass('visible'))){
          hidden.animate({"left":"-1000px"}, "slow").removeClass('visible');
          } else {
          hidden.animate({"left":"0px"}, "slow").addClass('visible');
          }
    });
  </code></pre>
  
  <p>Any idea how I could get this to work on scroll?</p>