Aymen Bouhastine Aymen Bouhastine - 1 year ago 597
jQuery Question

bootstrap multiselect : TypeError: $(...).multiselect is not a function

I want to use the bootstrap multi select plugin : Bootstrap Multiselect

but it is not working for me.

<script type="text/javascript" src="dist2/js/bootstrap-multiselect.js"></script>
<link rel="stylesheet" href="dist2/css/bootstrap-multiselect.css" type="text/css"/>

<script type="text/javascript">





Jai Jai
Answer Source

you need to have a jquery library and bootstrap library before your plugin:

<!-- 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"/>


You should always place your css before any script.

Get the reference from here.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download