I had select element:
<select id='selectBox'>
<option>Mustard</option>
<option>Ketchup</option>
<option>Relish</option>
</select>
and set click event via jquery:
$('#selectBox option').click(function(){
.....
});
after using http://silviomoreto.github.io/bootstrap-select/ :
<select id='selectBox' class="selectpicker" multiple="" data-selected-text-format="count">
<option>Mustard</option>
<option>Ketchup</option>
<option>Relish</option>
</select>
I got nice multiply dropdown and all work fine except that when I click on menu item (select or delestct it) nothing happends.
Why not click event proxies from my original (which was hided) option element to the new created element 'ul.dropdown-menu li a' ? How can I fix it?
Change you code to:
$('#selectBox').on('change', function(){
.....
});
this must work;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With