javascript - jQuery multiselect is not a function -


i'm new sort of web related stuff have been working away few weeks on web project @ work. today though hit problem couldn't solve. have been using multiselect plugin, http://www.erichynds.com/examples/jquery-ui-multiselect-widget/demos/, while without issue.

today tried include datatables plugin (https://www.datatables.net/) after doing multiselect function no longer available. attached simple example showing minimal example of when things break down when plugin included. shown, code work , when run show dropdown box. when uncommented line included , datatable plugin added, console in chrome gives error:

uncaught typeerror: $(...).multiselect not function(anonymous function) @ test.php:20i  @ datatables.min.js:14j.firewith  @ datatables.min.js:14n.extend.ready  @ datatables.min.js:14k  @ datatables.min.js:14 

from seems plugins in conflict somehow, i'm not quite sure how resolve this.

<link rel="stylesheet" type="text/css" href="../css/jquery.multiselect.css" /> <link rel="stylesheet" type="text/css" href="../includes/datatables/datatables.min.css"/>  <script src="//code.jquery.com/jquery-1.10.2.js"></script> <script src="//code.jquery.com/ui/1.11.4/jquery-ui.js"></script> <script type="text/javascript" src="../includes/jquery.multiselect.js"></script> <!--script type="text/javascript" src="../includes/datatables/datatables.min.js"></script-->  <?php      echo "<span id='test'>         <select multiple='multiple' id='test_dropdown'>             <option>1</option>             <option>2</option>         </select>     </span>";  ?>  <script>  $(document).ready(function() {     $("#test_dropdown").multiselect(); });  </script> 

thanks.

<?php        echo "<span id='test'>          <select multiple='multiple' id='test_dropdown'>              <option>1</option>              <option>2</option>          </select>      </span>";    ?>
code static output


Comments

Popular posts from this blog

c# - How Configure Devart dotConnect for SQLite Code First? -

java - Copying object fields -

c++ - Clear the memory after returning a vector in a function -