javascript click event queue
<p>I made a simple gallery where when you click on a image thumb nail, it will show the larger image with fade in fade out effect with jquery.</p>

<pre><code>$('#thumnail').click(function(){
  $('#piccontainer').fadeOut(function(){
      $('#piccontainer').html('&lt;div&gt; &lt;img src="' + imgsource + '"  /&gt; &lt;/div&gt;');
  });

  $('#piccontainer').fadeIn();
});
</code></pre>

<p>but if i click on a 5 different thumbnails quickly, the large image will fade in fade out for all 5 images.  How can I disable so that lets say i clicked on 5 thumbnails <strong>very quickly</strong>, it should only fadein the last 5th one.  <strong>basicaly how can i stop the queue of the click events?</strong></p>

<p>thanks for the help.</p>
