Javascript does not work on my page
Hey guys,
I'm having a problem with my javascript.
I have it put at the very end of the body tag like so...
echo '<script language="text/javascript">
$(document).ready(function() {
$(window).scroll(function(event) {
var top = 0;
var y = $(this).scrollTop();
if (y >= top) {
$("#byos-menu").addClass("byos-fixed");
}
else {
$("#byos-menu").removeClass("byos-fixed");
}
});
});
</script>';
echo '</body></html>';
I've put alerts in the js and none ever get called.
No console errors are shown when using chrome.
I just cant see what is wrong with this...