- Make sure you are including jQuery UI
- Try this:
$(this).effect('fold','slow', function(e) { $(this).addClass('hidden'); })
If you just chain .addClass()
directly after the .effect()
, it will happen immediately, rather than when the effect is complete. Therefore, if your .hidden
class actually hides things with CSS, they will seem to disappear right away, before you notice the fold effect. So .addClass()
should be a callback to .effect()
instead.