<script> var $jQ = jQuery.noConflict(); $jQ(window).scroll(function() { var scroll = $jQ(window).scrollTop(); if (scroll >= 5) { $jQ(".topWrapper").addClass("topScroll"); } else { $jQ(".topWrapper").removeClass("topScroll"); } });
</script>
If this does not work, check for a jQuery conflict by removing the first line:
var $jQ = jQuery.noConflict();
...and changing '$jQ' to 'jQuery' (without the quotes).
Comments