Why does not my plug in load? The jquery and plug in links are referenced. The plug in is called .. .. Please help me find what I am missing in the code.
<script src="~/Scripts/jquery-1.7.1.js"></script>
<script src="~/Scripts/chosen.jquery.js"></script>
<select class="chzn-select" tabindex="1" style="width:350px;" data-
placeholder="Choose a Country">
<option value=""></option>
<option value="United States">United States</option>
<option value="United Kingdom">United Kingdom</option>
<option value="Afghanistan">Afghanistan</option>
<option value="Albania">Albania</option>
</select>
<script>
$(document).ready(function(){
$(".chzn-select").chosen();
});
</script>
I am getting the firebug error:
TypeError: $(...).chosen is not a function
.chosen
is being called inside$(document).ready();
. So that means that the function will only run after jQuery is included. So it is not the problem with~
or.chosen
being included before jQuery.