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.
$('#thumnail').click(function(){
$('#piccontainer').fadeOut(function(){
$('#piccontainer').html('<div> <img src="' + imgsource + '" /> </div>');
});
$('#piccontainer').fadeIn();
});
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 very quickly, it should only fadein the last 5th one. basicaly how can i stop the queue of the click events?
thanks for the help.
stop(true,true).