Using jQuery's slideDown with display: inline-block
Asked Answered
S

1

17

How can I use jQuery's slideDown with display: inline-block, as opposed to the default display: block;

Some of the content inside the div I'm using requires it to be so, and the design partly breaks unless I fix it. However, fixing it after the sliding down has finished will be glitchy.

Any ideas?

Sousaphone answered 26/2, 2012 at 17:59 Comment(2)
Similar to #8145444Jurisdiction
Thanks, didn't find that while searching.Sousaphone
L
27

You should probably wrap the div with display: inline-block, into another div, with simple display: none, that will be the target of your slideDown function. I made up a demo for you here http://jsfiddle.net/d3BHL/2/
Let me know if it helps

Logarithmic answered 26/2, 2012 at 18:24 Comment(2)
Thanks, that's what I ended up doing (only, with CSS3)Sousaphone
This fiddle is broken. The display styles should be the other way around: container should be inline, and the inside div should be display none.Hygrometric

© 2022 - 2024 — McMap. All rights reserved.