Jquery multilevel list problem in IE

半腔热情 提交于 2019-12-24 04:32:25

问题


first of all sorry about my English...

Well, I try to create a sortable list of questions/answers and it works perfectly in FF but not in IE. In IE, when I try to sort an answer (second level li) the its question and the same group answers moves together with the selected question in a strange way.

Example

If you have any idea please let me know. Thanks in advance!


回答1:


Add this code as well and it should work

$('.answer').mousedown( function(e){ return false; } );

This will stop the bubbling effect of the mousedown event to reach the parent element that is also sortable.

Same thing can be accomplished with

$('.answer').mousedown( function(e){ e.stopPropagation(); } );

example http://jsfiddle.net/eFDWw/20/



来源:https://stackoverflow.com/questions/4333387/jquery-multilevel-list-problem-in-ie

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