I tried something like this:
someObject.fadeOut(500, function() {someObject.fadeIn();});
I expected the object to fade out and then to reappear. It doesn’t. It fades out and it never comes back. I found a workaround which looks like this:
someObject.fadeOut(500, function() {someObject.show(); someObject.fadeTo(0, 0); someObject.fadeTo(500,1); });
But that feels really awkward. What would be ‘best practice’ to fade an element out and (later) in again?
EDIT: OK, I tried around the problem somewhat more. The element I am fading is an SVG group in an inline SVG. If I hide a nomal HTML element, then everything works fine. So I guess the problem is connected to that. The svg.jquery extension I use? General problems with SVG and jQuery?
The problem was that I was trying to fade an SVG element. jQuery does not behave equivalently on SVG elements as on html elements as I expected.