鼠标拖拽区域选中插件selection.js

鼠标拖拽区域选中插件selection.js源码下载

看看谁在用

查看文件结构

文件大小:0.01M

资源分类: 插件-选择和筛选

更新时间: 2021-05-19

selection.js是一个纯JavaScript库,可以多选网格,允许用户选择多个DOM元素用鼠标拖动和触控手势。

事件调用方法
selection.on('beforestart', evt => {
  console.log('beforestart', evt);
});

selection.on('start', evt => {
  console.log('start', evt);
});

selection.on('move', evt => {
  console.log('move', evt);
});

selection.on('stop', evt => {
  console.log('stop', evt);
});
一些API方法
// disable
selection.disable();

// enable
selection.enable();

// destroy
selection.destroy();

// cancel the current selection process.
selection.cancel();

// manually trigger the start of a selection
// if silent is set to true, no beforestart event will be fired
selection.trigger(evt:MouseEvent | TouchEvent, silent: boolean = true)

// save the current selected elements and append those to the next selection
selection.keepSelection();

// clear the previous selection
selection.clearSelection(store:boolean = true);

// get selected elements as an array
selection.getSelection();

// manually append elements to the selection, can be a / an array of queries / elements 
// returns actual selected elements as array.
selection.select(query:(String | Element)[])

// remove a particular element from the current selection
// silent determines whether the move event should be fired
selection.deselect(el:HTMLElement, silent: boolean = true)

鼠标拖拽区域选中插件selection.js

正在加载文件目录...

也许你还喜欢

  1. 移动端滑动选择插件mobileSelect.js
  2. jquery底部弹出滑动选择时间控件
  3. jQuery移动端滑动选择时间插件
  4. jQuery范围拖拽滑动筛选插件
  5. jQuery移动端滑动选择地区
  6. jquery+weui弹出式城市地区选择插件
搜索自动完成网页插件light-search.js
  • 标签查找|关于我们|用户协议|格式化工具|bootstrapmb.com 版权所有 苏ICP备17077179号-2