插件描述:jquery.multi-select是一款jQuery开发的美化Select多选插件,界面上存在未选和已选两个框方便选择,支持分组。

HTML

elem 1

elem 2

elem 3

elem 4

...

elem 100

JavaScript$('#my-select').multiSelect()

OptionsafterInitfunctionfunction(container){}Function to call after the multiSelect initilization.

afterSelectfunctionfunction(values){}Function to call after one item is selected.

afterDeselectfunctionfunction(values){}Function to call after one item is deselected.

selectableHeaderHTML/TextnullText or HTML to display in the selectable header.

selectionHeaderHTML/TextnullText or HTML to display in the selection header.

selectableFooterHTML/TextnullText or HTML to display in the selectable footer.

selectionFooterHTML/TextnullText or HTML to display in the selection footer.

disabledClassString'disabled'CSS class for disabled items.

selectableOptgroupBooleanfalseClick on optgroup will select all nested options when set to true.

keepOrderBooleanfalseThe selected items will be displayed in the same order than they are selected.

dblClickBooleanfalseReplace the defautl click event to select items by the dblclick one.

cssClassString""Add a custom CSS class to the multiselect container.

Methods

.multiSelect(options)

Activates your content as a multiselect. Accepts an optional options object$('#your-select').multiSelect({});

Note: You must init the multiple select with $('#your-select').multiSelect() before calling one of the following methods.

.multiSelect('select', String|Array)

Select the item with the value given in parameter. The value can be either a string ('elem_1') matching the value of the option oran Array of values (['elem_1', 'elem_42']).$('#your-select').multiSelect('select', String|Array);

.multiSelect('deselect', String|Array)

Deselect the item with the value given in parameter. The value can be either a string ('elem_1') matching the value of the option oran Array of values (['elem_1', 'elem_42']).$('#your-select').multiSelect('deselect', String|Array);

.multiSelect('select_all')

Select all elements.$('#your-select').multiSelect('deselect_all');

.multiSelect('deselect_all')

Deselect all items previously selected.$('#your-select').multiSelect('select_all');

.multiSelect('refresh')

Refresh current multiselect.$('#your-select').multiSelect('refresh');

.multiSelect('addOption', Hash)

Dynamically add option to the multiselect.

The options hash is described bellow:valueStringtrueThe value of the option to create

textStringtrueThe text of the option to create

indexNumberfalseThe index where to insert the option. If none given, it will be inserted as last option.

nestedStringfalseIf there are optgroups you can choose under which optgroup you want to insert the option.$('#your-select').multiSelect('addOption', { value: 'test', text: 'test', index: 0, nested: 'optgroup_label' });

Keyboard[  ↓  ]  Down arrowSelect next item in the focused list

[  ↑  ]  Up arrowSelect previous item in the focused list

[ — ]  SpaceAdd/remove item depending on which list is currently focused

[ ← ]  Left arrowFocus the previous list

[ → ]  Right arrowFocus the next list

Demos

Pre-selected options

elem 1

elem 2

elem 3

elem 4

...

elem 100

$('#pre-selected-options').multiSelect();

Callbacks

elem 1

elem 2

elem 3

elem 4

...

elem 100

$('#callbacks').multiSelect({

afterSelect: function(values){

alert("Select value: "+values);

},

afterDeselect: function(values){

alert("Deselect value: "+values);

}

});

Optgroup

Yoda

Obiwan

Palpatine

Darth Vader

$('#optgroup').multiSelect({ selectableOptgroup: true });

html多选框 jquery,jQuery Select多选相关推荐

  1. 好用的下拉选框(单选,多选,全选,清空和反选,及个种样式)----个人钟爱

    下拉选框 如需样例和具体效果,请点击下面的连接. 好用的下拉选框(单选,多选,全选,清空和反选,及个种样式) 附件一:layui应用formselect layui.config({base: './ ...

  2. html 复选框 不能编辑,javascript-jqGrid-复选框编辑无法编辑所选行

    在我的jqGrid中,我有一个复选框,该复选框也可用于编辑,即用户可以单击该复选框,并且该复选框的值将在数据库中更新.很好但是,当我单击复选框时,如果再次尝试单击它,则什么也没有发生.该行不会保存.理 ...

  3. jq设置checked是否选中_jQuery对checkbox复选框操作:判断是否选中等

    <jQuery对checkBox复选框操作:判断是否选中等>要点: 本文介绍了jQuery对checkBox复选框操作:判断是否选中等,希望对您有用.如果有疑问,可以联系我们. 一.jqu ...

  4. Flutter:使用复选框进行下拉多选

    Flutter:使用复选框进行下拉多选 本文向您展示了在 Flutter 中使用复选框实现下拉多选的两种不同方法.在第一种方法中,我们将从头开始构建多选.在第二种方法中,我们将使用第三方包快速完成工作 ...

  5. 在reader中勾选pdf复选框_绝对可勾选的在WORD 2003中加入复选框的方法

    绝对可勾选的在 word 2003 中加入复选框的方法 方法一: 要在 word 2003 中加入复选框,最好是使用"控件工具箱"来完成. 具体方法是: 打开 Word ,依次点击 ...

  6. PyQt5 技巧篇-复选框绑定行内容,全选、清空、展示选中的内容功能实现演示,设置复选框选中,检查复选框选中状态

    先看效果图,选中了几行,然后将选中的内容展示出来. 我设置两个有序序列,分别存储对应的复选框和行内容. 我的行内容是用的 label 标签. # 存储右边label组件的有序列表def get_L_b ...

  7. java得到选择的复选框_java怎么获取复选框的值_java学习记录20200817

    2020.08.17-2020.08.23学习计划: (1)完成前端知识积累HTML+CSS+JavaScript(周一至周四) (2)完成ssm两门课复习(周一至周五) (3)完成所有已学代码的熟悉 ...

  8. 方形勾选框html,Selenium之勾选框操作

    勾选框操作: 所谓勾选框,也可以叫复选框,意思是可以勾选一个及以上或全部勾选.勾选框的图标一般都是方形的. 复选框勾选一般分为三种情况: ①勾选单个框,我们直接用元素定位的方式定位到点击即可. ②勾选 ...

  9. 5、Web 窗体的基本控件——复选框控件和复选组控件(CheckBox 和 CheckBoxList)

    5.Web 窗体的基本控件--复选框控件和复选组控件(CheckBox 和 CheckBoxList) 复选框控件和复选组控件(CheckBox 和 CheckBoxList) 前端 <%@ P ...

  10. php ajax勾选框提交,jQuery选取所有复选框被选中的值并用Ajax异步提交数据的实例...

    昨天和朋友做一个后台管理系统项目的时候涉及到复选框批量操作,如果用submit表单提交挺方便的,但是要实现用jQuery结合Ajax异步提交数据就有点麻烦了,因为我之前做过的项目中基本上没用Ajax来 ...

最新文章

  1. ACL 2018最佳论文公布!计算语言学最前沿研究都在这里了
  2. Zabbix使用JMX监控tomcat
  3. 记录一次maven依赖成功导入,但找不到相关包的IDEA臭bug
  4. youleb多风格响应式博客wordpress主题模板
  5. 移动端页面rem+media写法过程
  6. 中职“网络班级”中家校沟通模块的应用实践
  7. 2022年给正在创作的程序员的实用工具
  8. 查看进程的发起程序linux,Linux挂载iSCSI设备
  9. Recorder+人脸识别︱国内人脸识别技术趋势与识别难点、技术实践
  10. es中单机部署状态为Yellow解决办法
  11. 360浏览器(QQ浏览器 等双核浏览器) 极速 IE 兼容 模式的 兼容问题处理:设置优先使用极速模式 渲染和加载
  12. TX2安装ubuntu18,ROS
  13. Python 教程之 Numpy(4)—— 数据类型对象
  14. 51单片机 Proteus仿真 数码管 万年历 电子时钟 阴历阳历 星期 DS1302 修改时间
  15. 漏洞通告 | Oracle发布7月更新, 修复墨云科技报告的高危漏洞
  16. 网络安全问题打七寸,BlackBerry以安全软件面向企业话安全
  17. 高通骁龙865之camera性能深度分析(一)
  18. 华为云06FusionAccess
  19. linux系统ata1.00,linux – 哪个硬盘对应ata1.00和ata12.00?
  20. 硬盘数据恢复 U盘数据恢复 移动硬盘数据恢复

热门文章

  1. 7-3 jmu-Java-06异常-03-throw与throws (10 分)
  2. 退休当月要干到月底吗_在一线城市交社保那么多年,退休后到底在哪领养老金,要回老家吗?...
  3. 命令行 笔记本键盘禁用_宏碁发布Enduro系列三防笔记本电脑和平板电脑
  4. arcgis dem栅格立体感_如何使用ArcGIS从DEM数据中提取水系
  5. Java黑皮书课后题第5章:*5.18(使用循环语句打印4个图案)使用嵌套的循环语句,编写4个独立的程序打印下面的图案
  6. Java黑皮书课后题第3章:*3.25(几何:交点)第一条直线上面的两个点是(x1,y1)(x2,y2),第二条(x3,y3)(x4,y4),通过Cramer规则求出线性方程组
  7. 数字调相用计算机实现的步骤,第2章数据通信习题
  8. 队列 集合的前n个元素
  9. MongoDB 索引-9
  10. 中介者模式(Mediator Pattern)