I am trying to show and hide an inline element (eg a span) using jQuery.
If I just use toggle(), it works as expected but if I use toggle(\"slow\") to give it an ani
I don't think it is possible like that. The only way I could think to do it would be to animate its opacity between 0 and 1, and, using a callback on the animation, then turn it on or off.
$('.toggle').click(function() {
$('.hide:visible').animate(
{opacity : 0},
function() { $(this).hide(); }
);
$('.hide:hidden')
.show()
.animate({opacity : 1})
;
});