hi guys! i would like to know if it is possible to detect or "create an event" for when an element 's display property is set to visible?
That's for a small plugin i'm writing, that reveals elements in a list one by one at a given interval. Of course, the list is hidden at first. what i would like is that, by using show('), it triggers the effect. so $('ul').reveal(2000); // behaviour is set $('ul').show(); // animation should start. Is it possible or am i mixing up things? Here is my plugin so far: (function($){ $.fn.revealSequentially = function(options){ var opts = $.extend({}, $.fn.revealSequentially.defaults, options); return this.each(function(){ var $thisUL = $(this); var numOfLIInUL = $('li', $thisUL).length; var counter = 0; revealNextElement(opts); }); }; function revealNextElement(){ if (LiInStrata1Counter < numOfLIInStrata1) { $thisUL.eq(counter).fadeIn(opts.speed, function(){ counter = counter + 1; revealNextElement(); }); } } $.fn.revealSequentially.defaults = { speed: 'slow' }; })(jQuery); Thank you !! -- Alexandre Plennevaux