admin管理员组

文章数量:1296300

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

But i am totally blank and not understand why this is not working, the appearance of select list is not changing, can anybody please help me out?

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

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

But i am totally blank and not understand why this is not working, the appearance of select list is not changing, can anybody please help me out?

Share Improve this question asked Mar 31, 2013 at 7:36 user1740381user1740381 2,1999 gold badges40 silver badges62 bronze badges 1
  • Thanks for showing me a plugin I haven't seen before too. Select looks really good. I current use Select2 ivaynberg.github./select2 – Jeremy Commented Mar 31, 2013 at 7:43
Add a ment  | 

2 Answers 2

Reset to default 5

Perhaps add the invocation to make all .selectpicker elements a selectpicker? You will pretty much hit your head after seeing this. In the source of the Select plugin page you will see countless times where the demo uses a css selector to invoke .selectpicker() on the elements.

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

Please see. http://jsbin./anepet/3/edit

You are including the js twice and not invoking the selectpicker()..

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

and add this:

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

in the <header> and it will work

本文标签: javascriptBootstrap select plugin is not workingStack Overflow