Created
May 24, 2017 16:37
-
-
Save haknick/bedda20d89c9e922def11ae10fb11fab 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
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/ramda/0.21.0/ramda.min.js"></script> | |
<script type="text/javascript" src="https://code.jquery.com/jquery-3.2.1.min.js"></script> | |
<body class="clinical-trials"> | |
<div class="monotherapy"></div> | |
</body> | |
<script> | |
/* | |
t can be any of 1 to 5000 | |
*/ | |
var data = { | |
triggerPoints: [["therapy-tablet",1703],["loading-dose",2227],["oral-and-iv-solution",3014],["special-populations",4725]], | |
seo: [ | |
{ | |
'id': 'clinical-trials', | |
'title': 'Clinical Trials | VIMPAT\u00ae (lacosamide) CV', | |
'desc': 'Learn more about VIMPAT® (lacosamide) CV. See clinical data for adjunctive therapy and monotherapy pivotal trials.', | |
'prev': '', | |
'next': '/clinical-trials/adjunctive-therapy', | |
'url': '/clinical-trials', | |
'root': true | |
}, | |
{ | |
'id': 'adjunctive-therapy', | |
'title': 'Adjunctive Clinical Data | VIMPAT\u00ae (lacosamide) CV', | |
'desc': 'See clinical data from adjunctive pivotal trials for VIMPAT® (lacosamide) CV, indicated for patients with partial-onset (focal) seizures.', | |
'prev': '/clinical-trials', | |
'next': '/clinical-trials/monotherapy', | |
'url': '/clinical-trials/adjunctive-therapy', | |
'root': false | |
}, | |
{ | |
'id': 'monotherapy', | |
'title': 'Monotherapy Clinical Data | VIMPAT\u00ae (lacosamide) CV', | |
'desc': 'See clinical data from monotherapy pivotal trials for VIMPAT\u00ae (lacosamide) CV, indicated in patients with partial-onset (focal) seizures.', | |
'prev': '/clinical-trials/adjunctive-therapy', | |
'next': '/clinical-trials/loading-dose-trial-data', | |
'url': '/clinical-trials/monotherapy', | |
'root': false | |
}, | |
{ | |
'id': 'loading-dose-trial-data', | |
'title': 'Loading Dose Trial Data | VIMPAT\u00ae (lacosamide) CV', | |
'desc': 'Learn about the 200 mg Loading Dose Trial Data for VIMPAT\u00ae (lacosamide) CV, indicated in patients 17 years and older with partial-onset (focal) seizures.', | |
'prev': '/clinical-trials/monotherapy', | |
'next':'', | |
'url': '/clinical-trials/loading-dose-trial-data', | |
'root': false | |
}, | |
{ | |
'id': 'dosing-and-formulations', | |
'title': 'Dosing and Formulations | VIMPAT\u00ae (lacosamide) CV', | |
'desc': 'Learn about VIMPAT\u00ae (lacosamide) CV dosing and 1:1 conversion between formulations — from tablets to oral solution to intravenous (IV) solution.', | |
'prev': '/dosing-and-formulations/loading-dose', | |
'next': '/dosing-and-formulations/therapy-tablet', | |
'url': '/dosing-and-formulations', | |
'root': true | |
}, | |
{ | |
'id': 'therapy-tablet', | |
'title': 'Tablet Therapy | VIMPAT\u00ae (lacosamide) CV', | |
'desc': 'Adjunctive Therapy tablet dosing for VIMPAT\u00ae (lacosamide) CV. A therapeutic dose may be achieved after one week. Learn more about formulations and dosing.', | |
'prev': '/dosing-and-formulations', | |
'next': '/dosing-and-formulations/loading-dose', | |
'url': '/dosing-and-formulations/therapy-tablet', | |
'root': false | |
}, | |
{ | |
'id': 'loading-dose', | |
'title': 'Loading Dose Administration| VIMPAT\u00ae (lacosamide) CV', | |
'desc': 'Learn about the 200 mg Loading Dose for VIMPAT\u00ae (lacosamide) CV, indicated in patients 17 years and older with partial-onset (focal) seizures.', | |
'prev': '/dosing-and-formulations/therapy-tablet', | |
'next': '/dosing-and-formulations/oral-and-iv-solution', | |
'url': '/dosing-and-formulations/loading-dose', | |
'root': false | |
}, | |
{ | |
'id': 'oral-and-iv-solution', | |
'title': 'Intravenous (IV) Injection and Oral Solution | VIMPAT\u00ae (lacosamide) CV', | |
'desc': 'IV Injection and Oral Solution for VIMPAT\u00ae (lacosamide) CV may be an option when patients cannot swallow tablets. Learn more about formulations and dosing.', | |
'prev': '/dosing-and-formulations/therapy-tablet', | |
'next': '', | |
'url': '/dosing-and-formulations/oral-and-iv-solution', | |
'root': false | |
}, | |
{ | |
'id': 'home', | |
'title': 'Treating Patients with Partial-Onset Seizures | VIMPAT\u00ae (lacosamide) CV', | |
'desc': 'Learn about VIMPAT® (lacosamide) CV. More than 7 years of real-world experience, flexible dosing, multiple formulations, and patient savings.', | |
'prev': '', | |
'next': '/important-safety information', | |
'url': '/', | |
'root': true | |
}, | |
{ | |
'id': 'important-safety-information', | |
'title': 'HCP Important Safety Information | VIMPAT\u00ae (lacosamide) CV', | |
'desc': 'See Important Safety Information for VIMPAT\u00ae (lacosamide) CV, and learn more about VIMPAT formulations and dosing for healthcare professionals.', | |
'prev': '/', | |
'next': '', | |
'url': '/important-safety-information', | |
'root': false | |
}, | |
{ | |
'id': 'safety', | |
'title': 'HCP Important Safety Information | VIMPAT\u00ae (lacosamide) CV', | |
'desc': 'See Important Safety Information for VIMPAT\u00ae (lacosamide) CV, and learn more about VIMPAT formulations and dosing for healthcare professionals.', | |
'prev': '/', | |
'next': '', | |
'url': '/important-safety-information', | |
'root': false | |
}, | |
{ | |
'id': 'important-safety-information', | |
'title': 'HCP Important Safety Information | VIMPAT\u00ae (lacosamide) CV', | |
'desc': 'See Important Safety Information for VIMPAT\u00ae (lacosamide) CV, and learn more about VIMPAT formulations and dosing for healthcare professionals.', | |
'prev': '/', | |
'next': '', | |
'url': '/important-safety-information', | |
'root': false | |
} | |
] | |
}; | |
const headerOffset = 0;//114; | |
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; | |
} | |
} */ | |
} | |
var a = getSEOByPosition(1704,headerOffset); | |
console.log(a); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment