Robert Granlund
asked on
jQuery offset top
I have this script but it is making the top about 50px from the actual top. How do I change that so it is as close to the top as possible?
sections.each(function(e) {
var top = $(this).offset().top,
bottom = top + $(this).outerHeight();
if (cur_pos >= top && cur_pos <= bottom) {
nav.find('a').removeClass('active1');
sections.removeClass('active1');
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.