jQuery.fadeOut() - How to apply sequentially to a set of elements?

td.studios

New Member
I've 'n' buttons I need to \[code\]$('BUTTON').fadeOut();\[/code\]... but I'd like to see one button at time disappear.. how to ?I tried using next, but in the following way ALL disappears in one moment\[code\]$(".genresButton").first().fadeOut().next().fadeOut() ;\[/code\]I tried to use fadeOut to fadeOut the next, but I've not inital knowledge of total number of buttons. I tried using $.each() but without successEDIT:This is the working solution i choosed:\[code\]$("body").on('click', '.genresButton', function(event) { $(".genresButton").not($(this)).each(function(index){ $(this).delay(index * 500).fadeOut(450); });});\[/code\]
 
Back
Top