$(document).ready(function(){
var $nav = $(".top-normal .nav-normal")
var $win = $(window)
$nav.on('scroll',function(){
var top = $win.scrollTop()
alert(top)
if (top > 100){
$nav.css("backgroundColor","red")
}
});
});
Does anyone know why the code above doesnt work? I have linked correctly the javascript file in html and they are located on the same folder. (btw the problem isnt with linking) any help??