title: Disable typewriter function if already typing
body: <p>I have a jQuery function that emulates a typewriter effect, I have it being called on the <code>.mouseup()</code> handler function.</p>
  
  <p>Now if the user releases the <code>.mouseup()</code> 2 times really fast the typewriter effect doubles up and types something like this: "ttyyppeewwrriitteerr eeffffeecctt".</p>
  
  <p>It would be nice to know when it is done typing and disable mouse interaction while it is typing.</p>
  
  <p>Here is my jQuery function: ( <a href="http://jsfiddle.net/MARm2/1/" rel="nofollow">http://jsfiddle.net/MARm2/1/</a> )</p>
  
  <pre><code>//Typewriter Effect
  $.fn.Typewriter = function(opts){
      var $this = this,
          defaults = { animDelay: 50 },
          settings = $.extend(defaults, opts);
      $.each(settings.text, function(i, letter){
          setTimeout(function(){
              $this.html($this.html() + (letter!='\n'?letter:'&lt;br /&gt;'));
          }, settings.animDelay * i);
      });
  }
  </code></pre>
  
  <p>Here is the <code>.mouseup()</code> handler function:</p>
  
  <pre><code>$('#game_howto').mouseup(function(e) {
      $('#game_howto_slide1').Typewriter({
          animDelay: 50,
          text: 'Typewriter effect'
      });
  });
  </code></pre>
  
  <p>Thanks in advance!</p>