I have the following JQuery code:
<script type="text/javascript">
$(document).ready(function () {
var $containerHeight = $('.container').height();
if ($containerHeight < 760) {
$('.footer').css({
position: 'static',
bottom: 'auto',
left: 'auto'
});
}
});
</script>
And I get the very unhelpful error message:
Uncaught ReferenceError: $ is not defined
(anonymous function)
Any ideas where I’m going wrong?
You probably haven’t included jQuery before running your own code. Make sure you put this before your own
<script>tag: