title: Make jQuery code in window load, scroll and resize only fire once?
body: <p>I have code that fires on window load, scroll and resize: </p>
  
  <pre><code>jQuery(window).bind("load scroll resize", function() {
     // do stuff on every event
  
     // do something else only once
  
  });
  </code></pre>
  
  <p>However I want one part of the code to only fire once. How can this be done? </p>
  
  <p>UPDATE - I have a variable already defined in the code that re-fires that ideally id like to use in the code that doenst re-fire.</p>