On Jun 26, 1:14 pm, Jonny007-MKD <jonny007...@googlemail.com> wrote:
> i wanted to call your attention the the fadeIn and fadeOut function.
> after fadeout reduced the opacity to 0, it sets display = none and
> then exits. fadeIn first reverses this and then fades the object.
> i use this effect when i load new content via ajax combined with an
> animation to set the div height to the new value. the problem is, that
> display=none removes the placeholder for the element, so the elements
> at the bottom jump upward, then back down and then get moved.
> i know the workaround with the callback function, setting display to
> block and visibility to hidden, but i think it should also be no
> problem to insert an argument for fadeIn/Out what it shall do at the
> end, hide it with display or with visibility.

Just don't use fadeIn/fadeOut. They are intended to be simple ways to
show/hide an element with a fade effect.

Use animate instead:

$obj.animate( {'opacity':0} ); // fade out
$obj.animate( {'opacity':1} ); // fade in

Matt Kruse

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"jQuery Development" group.
To post to this group, send email to jquery-dev@googlegroups.com
To unsubscribe from this group, send email to 
jquery-dev+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/jquery-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to