The forums ran from 2008-2020 and are now closed and viewable here as an archive.
Home › Forums › JavaScript › I can’t make .ScrollTop Works.
Hi,
I’m making this page: http://www.alfa1009fm.com/sunabr/html/ and i want that the menu bar (#menup) be in 100% opacity when .ScrollTob is 0, and 10% when is more than 1. I have this:
$(function(){ $(window).scroll(function() { if(.scrollTop = 0) { $("#menup").css("opacity", "1"); } else(.scrollTop >= 1) { $("#menup").css("opacity", "0.1"); } } }); });
But this doesn’t works…
Any Help?