Line 85: | Line 85: | ||
$('#cBioSolar').removeClass("active"); | $('#cBioSolar').removeClass("active"); | ||
$('#cGCell').removeClass("active"); | $('#cGCell').removeClass("active"); | ||
+ | $('#cParts').removeClass("active"); | ||
} else if( scrollTop < $('#BioSolar').offset().top ){ | } else if( scrollTop < $('#BioSolar').offset().top ){ | ||
$('#cInspiration').removeClass("active"); | $('#cInspiration').removeClass("active"); | ||
Line 90: | Line 91: | ||
$('#cBioSolar').removeClass("active"); | $('#cBioSolar').removeClass("active"); | ||
$('#cGCell').removeClass("active"); | $('#cGCell').removeClass("active"); | ||
+ | $('#cParts').removeClass("active"); | ||
}else if( scrollTop < $('#GCell').offset().top ){ | }else if( scrollTop < $('#GCell').offset().top ){ | ||
$('#cInspiration').removeClass("active"); | $('#cInspiration').removeClass("active"); | ||
Line 95: | Line 97: | ||
$('#cBioSolar').addClass("active"); | $('#cBioSolar').addClass("active"); | ||
$('#cGCell').removeClass("active"); | $('#cGCell').removeClass("active"); | ||
− | }else{ | + | $('#cParts').removeClass("active"); |
+ | }else if( scrollTop < $('#Parts').offset().top ){ | ||
$('#cInspiration').removeClass("active"); | $('#cInspiration').removeClass("active"); | ||
$('#cBiofilm').removeClass("active"); | $('#cBiofilm').removeClass("active"); | ||
$('#cBioSolar').removeClass("active"); | $('#cBioSolar').removeClass("active"); | ||
$('#cGCell').addClass("active"); | $('#cGCell').addClass("active"); | ||
− | } | + | $('#cParts').removeClass("active"); |
+ | }else{ | ||
+ | $('#cInspiration').removeClass("active"); | ||
+ | $('#cBiofilm').removeClass("active"); | ||
+ | $('#cBioSolar').removeClass("active"); | ||
+ | $('#cGCell').removeClass("active"); | ||
+ | $('#cParts').addClass("active"); | ||
+ | } | ||
}); | }); | ||
}) | }) | ||
</script> | </script> | ||
+ | |||
+ | <script> | ||
+ | $(function() { | ||
+ | $('a[href*="#"]:not([href="#"])').click(function() { | ||
+ | if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) { | ||
+ | var target = $(this.hash); | ||
+ | target = target.length ? target : $('[name=' + this.hash.slice(1) +']'); | ||
+ | if (target.length) { | ||
+ | $('html, body').animate({ | ||
+ | scrollTop: target.offset().top | ||
+ | }, 1000); | ||
+ | return false; | ||
+ | } | ||
+ | } | ||
+ | }); | ||
+ | }); | ||
+ | </script> | ||
+ | |||
+ | <script> | ||
+ | $('a').click(function(){ | ||
+ | $('html,body').animate({ | ||
+ | scrollTop: $( $(this).attr('href') ).offset().top | ||
+ | }, 500); | ||
+ | return false; | ||
+ | }); | ||
+ | </script> | ||
+ | |||
+ | </body> | ||
+ | </html> |
Revision as of 14:44, 16 October 2016
Results
"Success is a science; If you have the conditions, you get the result."
Oscar Wilde