Changing CSS on percentage scrolled using query

mmcl055

New Member
I have a single page website with a fixed navigation. Each section is set to 100% of the windows height. I want to change the colour of the text in the navigation as you scroll down.I have this code so far which is exactly what i want apart from i need the scrolling to be based on percentage not amount of pixels.Looked everywhere for a solution, can anyone help!?\[code\]$(document).scroll(function(){ var row = $('.navigation a'), scrollTop = $(this).scrollTop(); if(scrollTop > 70) { row .css({"color":"#333333"}); } else if (scrollTop <= 70) { row.css({"color":"#d1d0ce"}); }});\[/code\]
 
Back
Top