How do I apply Chosen jQuery in my html page?
I have a select form so I need to use the multiple select by Chosen to make it look more user friendly.
<select class="chosen" multiple="true" name="faculty">
<option value="AC">A</option>
<option value="AD">B</option>
<option value="AM">C</option>
<option value="AP">D</option>
</select>
I’ve downloaded the files and copied it into my webpage folder.
So, what I did was include the chosen.jquery.min.js in <head>:
<script type="text/javascript" src="chosen/chosen.jquery.min.js"></script>
And the instruction says to Call the chosen plugin: $(".chzn-select").chosen();
I don’t know where to put that JavaScript statement in order to invoke Chosen multiple select. I thought it was as easy as using Bootstrap, hah. Any help?
If you follow one of Bootstrap’s example markup structures, you’ll notice that they call all their JavaScript files at the bottom (right above the
</body>tag).You’ll want to do the same; something like:
Inside this
script.jsfile, you’ll want to add something like: