sad*_*ave 0 jquery scroll jquery-ui draggable
我使用jQuery网站上的.draggable()UI设置了一个可拖动的div.我的主容器div被设置为窗口的宽度和高度溢出:隐藏所以页面上永远不会有滚动条.我的问题是,当我开始将可拖动的div拖离页面时,它会使我的页面滚动(我不想要).这是我的代码:
html, body{
margin:0 auto;
overflow:hidden;
}
#container #date-box{
position:absolute;
cursor:pointer;
background:url(/img/EWI/login/date-box.png) no-repeat;
width:247px;
height:21px;
z-index:9999;
margin:40px 0 0 15px;
}
$("div#container div#date-box").draggable();
Run Code Online (Sandbox Code Playgroud)
请帮忙!!!!
小智 7
http://jqueryui.com/demos/draggable/#option-scroll
默认值设置为滚动容器.在.draggable中设置选项({"scroll":false});