jQuery; How to call a function inside widget?

发布于 2022-09-06 08:12:05 字数 745 浏览 12 评论 0

I am using following jquery widget http://quasipartikel.at/multiselect/

I want to dynamically add options, by calling addOptions inside the following js. https://github.com/michael/multiselect/blob/next/js/ui.multiselect.js

So I tried

<script type="text/javascript">
function launchExtraOption(){
 var selectValues = new Object();
 selectValues['Abcd'] = 'Abcd';
 $("#countries").multiselect(function(){
  addOptions(selectValues);
 });
}
</script>

But I dont seem to be getting it to work. Can somebody help?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

娇柔作态 2022-09-13 08:12:05

taken from: http://quasipartikel.at/multiselect_next/

.multiselect( 'option', optionName, [value] )

Get or set any dialog option. If no value is specified, will act as a getter.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文