Good evening,
I have a piece of code that toggles a drop-down menu. In the menu, there are some DIVs positioned ‘outside’ their containing DIV. A jsFiddle can be found here: http://jsfiddle.net/nGSPg/3/
The problem is, when the ‘sliding’ animation is playing, the triangles are hidden. My questions are:
- Why is this?
- How do I solve this? I want the triangles to slide down and up just like their containing div.
Thanks in advance,
Silox
Update: The real problem actually is that slide() sets overflow to hidden on the element, so it will hide anything outside of it. When it is finished it will remove it making them appear again.
Because the triangles have position:absolute, they will only appear after the slide is finsished.
To fix this I would give them a position: relative and move them outside that box and put it all in a container div that itself gets the slide applied to it.
The updated HTML:
and the CSS:
Here’s a forked example that shows it working.