js/main.js
/* onScroll FUNCTION - ADDING class="active" to navi links */
onScroll FUNCTION - ADDING class="active" to navi links
onScroll FUNCTION - ADDING class = " active " to navi links
function onScroll(event){
				var scrollPos = $(document).scrollTop();
				$('.cd-main-nav a').each(function () {
					var currLink = $(this);
					var refElement = $(currLink.attr("href"));
					if (refElement.position().top <= scrollPos && refElement.position().top + refElement.height() > scrollPos) {
						$('.cd-main-nav ul li a').removeClass("active");
						currLink.addClass("active");
					}
					else{
						currLink.removeClass("active");
					}
				});
			}
function onScroll ( event ) { var scrollPos = $ ( document ) . scrollTop ( ) ; $ ( '.cd-main-nav a' ) . each ( function ( ) { var currLink = $ ( this ) ; var refElement = $ ( currLink . attr ( "href" ) ) ; if ( refElement . position ( ) . top <= scrollPos && refElement . position ( ) . top + refElement . height ( ) > scrollPos ) { $ ( '.cd-main-nav ul li a' ) . removeClass ( "active" ) ; currLink . addClass ( "active" ) ; } else { currLink . removeClass ( "active" ) ; } } ) ; }
onScroll FUNCTION - ADDING class="active" to navi links
onScroll FUNCTION - ADDING class = " active " to navi links