Bootstrap selection plugin not working

I am trying to use this Bootstrap-Select Plugin . I also created the violin according to the demo,

http://jsbin.com/anepet/1/edit

But I am completely empty and do not understand why this does not work, the appearance of the selection list does not change, can someone help me?

+4
source share
2 answers

Perhaps add a call so that all .selectpicker elements select selectpicker? When you see this, you will hit your head hard. In the source of the selection page, you will see many times when the demo uses the css selector to call .selectpicker() on elements.

 <script type="text/javascript"> $('.selectpicker').selectpicker(); </script> 

Please look. http://jsbin.com/anepet/3/edit

+5
source

You include js twice and do not call selectpicker() ..

delete this line: <script src="http://silviomoreto.github.com/bootstrap-select/javascripts/bootstrap-select.js"></script>

and add this:

 <script type="text/javascript"> $(document).ready(function(){ $('.selectpicker').selectpicker(); }); </script> 

in <header> and it will work

+2
source

All Articles