skip to Main Content

I’m trying to use the multi select plugin (http://davidstutz.github.io/bootstrap-multiselect/)

I get the folllowing error: $(…).multiselect is not a function

and I can’t figure out how to make it work…

<!-- Include Twitter Bootstrap and jQuery: -->
<link rel="stylesheet" href="css/bootstrap.min.css" type="text/css"/>
<script type="text/javascript" src="js/jquery.min.js"></script>
<script type="text/javascript" src="js/bootstrap.min.js"></script>

<!-- Include the plugin's CSS and JS: -->
<script type="text/javascript" src="js/bootstrap-multiselect.js"></script>
<link rel="stylesheet" href="css/bootstrap-multiselect.css" type="text/css"/>

Here is my select:

<select class="multiselect" multiple="multiple">
    <option value="0">value0</option>
    <option value="1">value1</option>
    <option value="2">value2</option>
    <option value="3">value3</option>
</select>

And then I call the plugin:

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

I’ve tried to call the plugin where I link the css and js, but it still won’t work.

2

Answers


  1. Chosen as BEST ANSWER

    I found my mistake!

    I was linking another jquery.min.js further in my code. Now it works just fine!


  2. If you’re working with ASP.Net check the follow. If the Master Page has JS or CSS in your aspx don’t put them again, ’cause the aspx Inherits from the Master Page. Just put the missing ones.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search