jQuery UI Multiselect小部件清除所有复选框 [英] jQuery UI Multiselect widget clear all check boxes

查看:117
本文介绍了jQuery UI Multiselect小部件清除所有复选框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

希望快点...

我需要在页面上单独按钮的点击事件中触发uncheckAll事件,我尝试了以下操作:

I need to fire the uncheckAll event in the click event of a separate button on my page, I have tried the following:

$('.masterProviderOrgsListBox').multiselect().uncheckAll();

但这不是公认的方法。我基本上想要点击标题中单击取消全部选中框时触发的相同方法。

but this isnt a recognised method. I basically want to fire the same method that is fired when you click the "Uncheck All" box in the header.

我以前这样做过:

$('.masterProviderOrgsListBox option:selected').removeAttr("selected");

但这会删除实际多选而不是jQuery UI小部件的选择。

but this removes the selections on the actual multiselect rather than the jQuery UI widget.

无法在文档中找到任何想法,任何想法?

Couldnt find anything in the documentation, any ideas?

推荐答案


方法

初始化实例后,通过以下任何一种方法调用
与它进行交互:

After an instance has been initialized, interact with it by calling any of these methods:

//例如:$(#multiselect)。multiselect(method_name);

...可以在小部件中找到方法

...which can be found in the widgets documentation under Methods

$("#multiselect").multiselect("uncheckAll");

这篇关于jQuery UI Multiselect小部件清除所有复选框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆