本文介绍了更改后更新multiselect.js的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

只是尝试将





为什么刷新不能正常工作?

解决方案

一个错误。我今天提交了一个补丁来修复这个问题。



为了您的利益,如果您遇到任何与我的插件有关的问题,您可以在



谢谢

Just trying to use multiselect.js for multiple type select input's

Here is what select looks like

<select multiple="multiple" id="my-select" name="my-select[]">
    <option value='elem_1'>elem 1</option>
</select>

Using multiselect like this -

var s = $('#my-select');
s.multiSelect({
    selectableHeader: "<div class='custom-header'>Options</div>",
    selectionHeader: "<div class='custom-header'>Selected</div>"
});

Here is what it looks like --> http://jsfiddle.net/6k8gW/5/

This work's fine until i try to add new option

s.append($('<option />').text("new").val("value"));
s.multiSelect('refresh');

And the output is like this --> http://jsfiddle.net/6k8gW/6/

Why refresh is not working properly ?

解决方案

It's indeed a bug. I submitted a patch today which should fix this.

For your interest if you encounter any problem with my plugin you can add an issue at https://github.com/lou/multi-select/issues

Thanks

这篇关于更改后更新multiselect.js的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-10 19:53