2
我有一個jQuery可拖動的容器div,當滾動上下時不應拖動側滾動條。 .infotext是具有文本的內部div,包含在設置爲溢出的#infobody中:auto。我需要一種方法來取消選擇子滾動條時父窗格上的可拖動功能。這裏是我的代碼:當使用子元素滾動條時,如何禁用可拖動的div
$(".lsidebar").draggable({"scroll":false});
.lsidebar #infobody{
cursor:default;
position:absolute;
width:100%;
overflow:auto;
margin:23px 0 0 0;
z-index:14;
}
#infobody .infotext{
cursor:default;
position:relative;
width:100%;
z-index:14;
color:#969696;
}
我建議你刪除這個問題,因爲你問的另一個有更多的答案,也包括你的問題。 :D http://stackoverflow.com/questions/3300765/how-to-disable-draggable-div-when-scroll-bar-is-focused-on-in-jquery – 2011-09-05 16:29:22