bootstrap-select设置容器时,选项后选项不会隐藏?

时间:2017-12-07 03:45:15

标签: bootstrap-select

bootstrap-select设置容器时,选项后选项不会隐藏?

<form id="searchForm" action="" method="post" class="form-search">

   <label>section :</label>

   <select name="section.id" class="" onchange="" id="section" tabindex="-98">

     <option value="35">S340NJ-LM2_ </option>

     <option value="16">S340NJ-</option>

   </select>

 $('select').selectpicker({
     container:'.form-search',
     liveSearch: true
 })

删除js第2行,会找到

的jsfiddle: https://jsfiddle.net/Seven4X/9ge8mcgp/

1 个答案:

答案 0 :(得分:2)

您需要将该类添加到您的选择标记

class="selectpicker"