Ray
Ray

Reputation: 603

bootstrap-select when setting container then the options will not hiding after selected?

bootstrap-select when setting container then the options will not hide after selected?

<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
 })

delete js line 2, will find

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

Upvotes: 0

Views: 421

Answers (1)

Robert I
Robert I

Reputation: 1527

You need to add the class to your select tag

class="selectpicker"

Upvotes: 2

Related Questions