Created
May 24, 2017 16:38
-
-
Save haknick/0b1007455f7b698ac67961f733331a00 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var getSEOByPosition = function(scrollTop, headerOffset) { | |
//-------------------- | |
onsole.log('LENGTH', sections.length); | |
/* for (var i=0; i<sections.length; i++) { | |
// if position is above or below nav sections then set the activeSection to null | |
if (t <= sections[0][1] - headerOffset ) { | |
for(var j=0; j<seo.length; j++) { | |
if($('body').hasClass('page-'+seo[j].id)) { | |
activeSection = seo[j]; | |
break; | |
} | |
} | |
} else if (t >= sections[i][1] - headerOffset) { | |
for(var k=0; k<seo.length; k++) { | |
if( seo[k].id === sections[i][0] ) { | |
activeSection = seo[k]; | |
break; | |
} | |
} | |
} else { | |
break; | |
} | |
} */ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment