软件之家jQuery UI-Draggable 参数集合-Web前端之家

Draggable 库文件:ui/ui.core.js、ui/ui.draggable.js
============================================================ Default:

$.draggable({ containment: ‘parent’ }卡塔尔(قطر‎; //节制在父系框架中

delay-start: $.draggable; //移动20像素伊始拖动
$.draggable;//延迟1秒后伊始扶拖拖拉拉机动
============================================================ snap-to :
$.draggable; //暗许,任何方法吸附 $.draggable({ snap:
‘.ui-widget-header’ }卡塔尔(قطر‎; //以某成分的光景径吸附 $.draggable({ snap:
‘.ui-widget-header’, snapMode: ‘outer’ }卡塔尔国;
//以某成十一分径吸附,吸附形式:本上吸其下,本下吸其上. 内径吸附:inner,
吸附格局:相反 $.draggable;//以一定间距移动 $.draggable;
============================================================ scroll:
$.draggable; $.draggable({ scroll: true, scrollSensitivity: 100 }卡塔尔;
//滚动条敏感度 $.draggable({ scroll: true, scrollSpeed: 100 }卡塔尔;
//滚动速度 ============================================================
revert position: $.draggable; //revert:true 设置为还原到位置$.draggable({ revert: true, helper: ‘clone’ }卡塔尔; //helper:’clone’
复制拖动 ============================================================
visualfeedback : $.draggable({ helper: ‘original’ }卡塔尔(قطر‎; //设置不复制
$.draggable({ opacity: 0.7, helper: ‘clone’ }State of Qatar;
//opacity设置发光度,并克隆成分 $.draggable({ cursor: ‘move’,
//设置鼠标图形 cursorAt: { top: -12, left: -20 }, //地方一定坐标设置
helper: function { return $(‘ I’m a custom helper ‘卡塔尔国; }
//新建提醒成分,上边安装其以鼠标定位地方值 }State of Qatar; $.draggable({ stack: {
group: ‘#set div’, min: -1 }
}卡塔尔;//群组织设立置拖动,而且最后加多的要素叠合到该群组的最下边.符合做种下心愿板效果。
============================================================ Drag handle
: $.draggable; //handle设置完毕拖动地点 $.draggable({ cancel:
“p.ui-widget-header” }卡塔尔国; //cancel设置节制拖动位置============================================================ Cursor
style : $.draggable({ cursorAt: { cursor: ‘move’, top: 56, left: 56 }
}State of Qatar; //cursor设置鼠标准样板式,
top、left、right、bottom设置元素相对鼠标的定位点 $.draggable({ cursorAt:
{ cursor: ‘crosshair’, top: -5, left: -5 } }卡塔尔国; $.draggable({ cursorAt: {
bottom: 0 } }卡塔尔;
=========================================================== Cursor style
: $.draggable({ cursorAt: { cursor: ‘move’, top: 56, left: 56 } }State of Qatar;

//cursor设置鼠标准样本式, top、left、right、bottom设置成分相对鼠标的定位点

Draggable+sortable: $.sortable; $.draggable({ connectToSortable:
‘#sortable’, //设置拖动出席到别的列表中 helper: ‘clone’, revert:
‘invalid’ }卡塔尔(قطر‎;

$.draggable();

constrain-movement: $.draggable; //限制y轴 $.draggable; //限制x轴
$.draggable({ containment: ‘#containment-wrapper’, scroll: false }卡塔尔国;
//不现身滚动条 $.draggable({ containment: ‘#软件之家,demo-frame’ });

相关文章

发表评论