I have downloaded the jQuery Chosen plugin as I want to implement the simple “multiselect” version. So I’ve just copied and pasted it in code igniter. I am not a newbie and know almost every thing about how to run jQuery etc.
However I don’t know why it is not working on my code igniter, but it works fine without the code igniter.
This is my view page :
<script src="<?php echo base_url();?>js/chosen.jquery.js" type="text/javascript" > </script>
<link rel="stylesheet" href="<?php echo base_url();?>css/chosen.css" />
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js" type="text/javascript"></script>
<body>
<em>Multiple Select</em>
<select data-placeholder="Choose a Country..." class="chzn-select" multiple>
<option value=""></option>
<option value="United States">United States</option>
</select>
<script type="text/javascript">
$(".chzn-select").chosen();
$(".chzn-select- deselect").chosen({ allow_single_deselect: true });
</script>
</head>
</body>
</html>
I have checked through Firebug also, the page is loading every script so there is no way that I might have given a wrong path. No error is coming up any where. I don’t know what to do.
You are including the chosen plugin before jquery.js, you should in have errors in the console. Try this:
These lines should also be placed within the
<head>tag, before the<body>