jquery-select2 (not working)
Place for comments, problems, questions, or any issue related to the JavaScript / PHP scripts from this site.
-
JanMolendijk
- Posts:282
- Location:Holland Rotterdam
jquery-select2 (not working)
Dear admin I`m testing this script on my server
https://coursesweb.net/jquery/selec2_jp , but it does not work.
I simply did copy your code for a test on my XAMPP Version: 5.6.31
Code: Select all
<link href="css/select2.min.css" rel="stylesheet" />
<script src="js/select2.min.js"></script>
<script type="text/javascript" src="js/jquery.js"></script>
<select style="width:280px;" class="multi_sel" multiple="multiple" name="sel2">
<option value="v1">Alabama</option>
<option value="v2">Alaska</option>
<option value="v3">California</option>
<option value="v4">Nevada</option>
<option value="v5">New Mexico</option>
<option value="v6">Oklahoma</option>
<option value="v7">Oregon</option>
<option value="v8">Washingon</option>
</select>
<script>
$('.multi_sel').select2({
placeholder: 'Select a state',
maximumSelectionLength: 3
});
</script>
I hope you have some idea`s for me what i could do wrong ?
Admin
Posts:805
Hello,
When you use jquery plugins, you have to add the jquery library before the JS script with the plugin.
So, "js/jquery.js" before "select2.min.js".
Code: Select all
<script type="text/javascript" src="js/jquery.js"></script>
<script src="js/select2.min.js"></script>
JanMolendijk
Posts:282
Thank you for the support Admin,
i thought their was a problem with
the PHP-version or something else
It is working fine now (stupido me)
Similar Topics
- GET_id not working in UnLink (delete file)
PHP - MySQL
First post
I searching for an hour for a solution; unlink seems not to work with GET id
<?php
$id = (int) $_GET ;
echo $_GET ;
$file = fopen( '.$_GET...
Last post
Here is an answer `o god after 2 hours shame on me for this one`
<?php
$file_pointer = $_GET .'.txt';
if (!unlink($file_pointer)) {
echo (...
- XAMPP-server only local host working
General Forum
First post
Dear Coursesweb,
I have a problem after round 10 hours searching I come to you for suport.
Only the local host is working: //127.0.0.1
But I...
Last post
OK thanks MarPlo.... Wishing overseas nice weekend