[英]Remove multiple attribute from jquery selectric
I need to allow multiple select sometimes, and sometimes not. 我有时需要允许多重选择,有时则不允许。 I try to remove the attribute and call init, but it still allow to select multi.
我尝试删除该属性并调用init,但仍然允许选择multi。
$('#dateSelect').removeAttr('multiple');
$('#dateSelect').selectric('init')
Call 'destroy' solved my issue. 呼叫“ destroy”解决了我的问题。
$('#Country').removeAttr('multiple');
$('#Country').selectric('destroy')
$('#Country').selectric('init')
https://jsfiddle.net/es69ys48/ https://jsfiddle.net/es69ys48/
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.