<script type="text/javascript">
var isMousemove=false;//全局变量,用来存贮鼠标移动状态
$(function(){
isMousemove=true;//设置鼠标移动为真
$("#list1, #list2,#list3").dragsort({
dragSelector: "li",
dragBetween: true,
dragEnd: saveOrder,
placeHolderTemplate: "<li class='placeHolder'></li>"
});
function saveOrder() {
isMousemove=true;//设置鼠标移动为真
var data = $("#list1 li").map(function() { return $(this).children().html(); }).get();
$("input[name=list1SortOrder]").val(data.join("|"));
};
$(".list_title").click(function(){
$(this).siblings("ul").toggle();
});
$(".list_child").click(function(){
if(!isMousemove){//判断鼠标移动是否为真
alert("拖拽能能触发点击我么?");
return false;
}else{
isMousemove=false;
}
})
})
</script>
附件:http://down.51cto.com/data/2362858