davist11/jQuery-One-Page-Nav — Issue #11: In some cases, curClass is applied to the last menu item, not to the really current one.
Author: B00StER
Created: 2012-03-08 22:49:46+00:00
State: open

The problem is in the function getSection. You just should break the "for" loop after getting the first 'true' result:

`
for(var section in onePageNav.sections) {
if((onePageNav.sections[section] - windowHeight) < windowPos) {
returnValue = section;
break; // --- Add this line ---
}
}
return returnValue;
};

`