Hi im trying to add some effects to divs on my website using Jquery. I want some elements to expand out on load and then when the user leaves the page I want the divs to close the opposite way the opened. My problem is that when the animations play (both opening and closing) the text seems to go on new lines whilst the box is getting smaller, how do I stop that from happening?
I can show you an example on this website
See Example 3 (Collapse left) – Note the Moving Text
http://www.adipalaz.com/experiments/jquery/expand_collapse_different_directions.html
There is a way to achieve this. You need to have an
innerandoutercontainer for each object. You then move theinnercontainer left or right and have theoutercontainer’soverflowproperty set tohidden.Check out this demo