jQuery fadeIn on position:absolute causes z-index issue

后端 未结 5 516
青春惊慌失措
青春惊慌失措 2020-12-15 07:57

Technically I\'m using fadeToggle() but they\'re cousins... basically my issue is that I have an absolutely positioned div which I am using slideToggle()<

5条回答
  •  無奈伤痛
    2020-12-15 08:30

    Slidetoggle is really quirky... I've had a similar issue. The way I got it to work on my website was to just move the toggled div to the very bottom of my html. Because it comes last in the DOM, the z-index should be automatically set higher than the previous elements. Since it's absolutely positioned, you shouldn't have any issues with layout, either.

提交回复
热议问题