I would like to show / hide a paragraph of text using jQuery left to right.
I’m using
$('#text').animate({
width: ['toggle', 'swing']
});
However I am seeing that the paragraph wraps as the animation is happening. And it looks ugly.
See this js fiddle for an example of the undesired effect.
How would you recommend getting the same effect but with no wrapping? (Like .slideUp() / slideDown())…
Thanks for any help
You need to set
overflow: hiddenon the container, and then apply the animation to the container.Updated fiddle with fix here