Archive for February 14th, 2011

Ever have the problem where you want to fade out a whole collection of stuff, and then show only one? A naive implementation looks like this: $(‘.options .option’).fadeOut(‘fast’, function() { $(‘.options .option:eq(4)’).fadeIn(‘fast’)}); If you have five options, however, the callback gets called five times. Now, this is okay in the current example: fadeIn is idempotent, [...]


Recent Comments