zelocalhost
zelocalhost

Reputation: 1183

Animation with jquery , animate / toggle

i would like to toggle #header-connect-content-toggled with a onclick on #header-connect-content-avatar, i tried two solutions:

I have a div with fix content and another div with width variable.

Problem is , the content is verticaly modified or the container div does not follow the movement...

what is the correct way for this animation ?

Upvotes: 0

Views: 135

Answers (1)

Jazzuzz
Jazzuzz

Reputation: 490

See the fiddle here http://jsfiddle.net/yinkadet/DRhw6/28/ , I'm guessing that's what you want. The first approach is cleaner, I just added an overflow-x:hidden and made it not wrap on whitespace as below:

 <div id="header-connect-content-toggled" style="float: left; background-color: #800000; overflow:hidden; white-space:nowrap;">

That way, it slides right without the content breaking into new lines and stretching out your divs.

I hope this helps

Upvotes: 3

Related Questions