How do I make this function fire at exactly 10% of the scrolled window/doc?
<p>The below function fires function doSomething when it reaches 10% of the page, but as you continue to scroll, it keeps firing. How do i make it fire one at 10% and cease after that?</p>

<p>All the best,</p>

<p>Joey</p>

<pre><code>  $(document).scroll(function(e){

      // grab the scroll amount and the window height
      var scrollAmount = $(window).scrollTop();
      var documentHeight = $(document).height();

      // calculate the percentage the user has scrolled down the page
      var scrollPercent = (scrollAmount / documentHeight) * 100;

      if(scrollPercent = 10) {
          // run a function called doSomething
          doSomething();
      }

      function doSomething() { 
            $(".fill").append('&lt;img src="img/arrow-down.png"/&gt;');

          // do something when a user gets 10% of the way down my page
      }

  });
</code></pre>
