This can happen for instance when JQuery has not been fully loaded before trying to execute JQuery code.
Using $(document).ready(function($) is one way to solve this, as this should wait until JQuery is fully loaded.
<script type="text/javascript"> $(document).ready(function($) { //some awsome jquery code }); </script> |