【问题标题】:Select element through jQuery in sumo select plugin not working在相扑选择插件中通过jQuery选择元素不起作用
【发布时间】:2016-09-20 11:32:38
【问题描述】:

我正在尝试通过 jQuery 在 sumoselect 下拉列表中选择一个值:

 $('select.multiple-select2')[0].sumo.selectItem(2);

它没有被选中。

Sumoselect - https://hemantnegi.github.io/jquery.sumoselect/

请帮帮我。

【问题讨论】:

    标签: javascript jquery select sumoselect.js


    【解决方案1】:

    你需要使用selectItem方法如下:

    $('select.multiple-select2')[0].sumo.selectItem(2);
    

    查看https://hemantnegi.github.io/jquery.sumoselect/的文档

    您正在尝试没有像setItem 这样的方法。

    【讨论】:

    • 对不起 vijayP,这是 selectItem 本身,但我的错字,它也不起作用
    • 你能为此创建一个小提琴或sn-p吗?
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-05-09
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多