title: Allow only one action per click JQUERY
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/11135932/execute-a-function-only-once">execute a function only once</a>  </p>
  </blockquote>
  
  
  
  <p>i have this bit of code and i would like the DIV insideframe to move just once, and it works if i click with an interval of time. </p>
  
  <p>if i make many clicks at once, it will move endlessly, not only once :/</p>
  
  <pre><code>$(document).ready(function(){
      $(".arrow").click(function(){
          pos = $("#insideframe").css('margin-left');
          pos = (pos.substr(0, 3));
          var posi = parseInt(pos);
          if(posi &lt; -23 ){
              die();
          }else if(posi &gt; -20 ){
              $("#insideframe").animate({
                  marginLeft: '-=230'
                  }, 800 );
          }
      });
  });
  </code></pre>
  
  <p><strong>How can i make it trigger just once?</strong></p>