IE7: CSS & jQuery: dragging up, dragged item is on top, dragging down: dragged item is below. How do I get both to be on top?

人走茶凉 提交于 2019-12-10 23:19:25

问题


Here is my jsfiddle code: http://jsfiddle.net/SMqR9/16/

You'll notice that in IE7, when you drag an item up, it is visible until it is placed. But if you drag an item down, it somehow has a lower z-index than the things we could want to drag and drop the item into.

Any ideas?


回答1:


Somehow none of the fiddles that were produced work in my IE9 anymore, not even those, that were working before. Since the last posted revision (26) works in Opera, Chrome and FF, as well as Comp-Mode of IE and IE7, i have to assume it is related to either my IE or JSFiddle and should be working correctly.

http://jsfiddle.net/SMqR9/26/

I think that finally works.

On MouseDown increasing .closest('.section')'s z-index to 5000. On MouseUp lowering it to 1000.

The numbers are chosen randomly, no need to set it that high. Just make sure to lower it to something below your other z-index values



来源:https://stackoverflow.com/questions/6850154/ie7-css-jquery-dragging-up-dragged-item-is-on-top-dragging-down-dragged-i

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!