highlight menu on scrolling (if reach div)
问题 i want highlight the menu point if the div is scrolled // or clicked. http://jsfiddle.net/WeboGraph/vu6hN/2/ (thats an example what i want) my code: (JS) $(document).ready(function(){ $('nav a').on('click', function(event) { $(this).parent().find('a').removeClass('active_underlined'); $(this).addClass('active_underlined'); }); $(window).on('scroll', function() { $('.target').each(function() { if($(window).scrollTop() >= $(this).position().top) { var id = $(this).attr('id'); $('nav a')