I have a single page website with the navigation menu position:fixed
at the top of the page.
When I click a link from the navigation menu the page scrolls to the appropriate section using this JQuery:
$('a[href^="#"]').live('click',function(event){
event.preventDefault();
var target_offset = $(this.hash).offset() ? $(this.hash).offset().top : 0;
$('html, body').animate({scrollTop:target_offset}, 1200, 'easeOutExpo');
});
What I'd like to happen is when I manually scroll the page $(window).scroll(function(){...});
, relevant to the section passing under the navigation menu #navi-container
, the navigation link highlights using .addClass('activeNav');