【发布时间】:2019-08-30 02:41:28
【问题描述】:
我使用 bootsrap-select
当我参考 Bootstrap-select 时出现此错误
错误是 :TypeError: this.$element.find(...)[0] is undefined
刷新时:$('.selectpicker').selectpicker('refresh');
感谢
【问题讨论】:
我使用 bootsrap-select
当我参考 Bootstrap-select 时出现此错误
错误是 :TypeError: this.$element.find(...)[0] is undefined
刷新时:$('.selectpicker').selectpicker('refresh');
感谢
【问题讨论】:
我修复了这个错误
我们给标签一个 id 并使用该 id 来引用它。
<select id="selectid" class="selectpicker">
<option>1</option>
<option>2</option>
</select>
现在刷新
$('#selectid').selectpicker('refresh');
【讨论】: