div disappearing on margin & width animaton problem - jquery
I have coded my div to re size and change margin on cli开发者_Go百科ck of a div with id = switch
. But it is disappearing on beginning of animation and reappear on the completion of animation. Ypu can see my fiddle here. Why is this happening and how can I avoid this??
Thanks in advance...:)
blasteralfred
Add
overflow: visible !important;
to #sidebar
and#switch
won't disappear during the animation.
It is happening because it is hidden underneath your "viewer". If you can move your switch inside the "viewer" and float it left, set margin-left. Should fix it.
During the animation the elements overflow is set to "hidden". As #switch is visually placed outside #sidebar it disappears. Christopher's solution should override it. It also would'nt happen if you place #switch inside #viewer
精彩评论