CharisKomos (Talk | contribs) |
CharisKomos (Talk | contribs) |
||
Line 44: | Line 44: | ||
</script> | </script> | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
<!-- Smooth Scrolling (Top to Bottom and vice versa) | <!-- Smooth Scrolling (Top to Bottom and vice versa) | ||
Line 219: | Line 183: | ||
</body> | </body> | ||
+ | |||
+ | <!-- Display Subsection Functionality --> | ||
+ | <script> | ||
+ | function displayMe(idz){ | ||
+ | $('#display_box').css('display', 'block'); | ||
+ | var stateMsg; | ||
+ | switch(idz){ | ||
+ | case 'c_t1': stateMsg = 'Overview'; | ||
+ | break; | ||
+ | case 'c_t2': stateMsg = 'Description'; | ||
+ | break; | ||
+ | case 'c_t3': stateMsg = 'Results'; | ||
+ | break; | ||
+ | case 'c_t4': stateMsg = 'Notebook'; | ||
+ | break; | ||
+ | } | ||
+ | window.history.replaceState(null, null, stateMsg); | ||
+ | $('.display_frame').removeClass('reveal'); | ||
+ | $('#' + stateMsg).addClass('reveal'); | ||
+ | |||
+ | $("#linka").on("click", function( e ){ | ||
+ | |||
+ | e.preventDefault(); | ||
+ | |||
+ | $("body, html").animate( | ||
+ | /* Styles */ | ||
+ | { scrollTop: $( $(this).attr('href') ).offset().top }, | ||
+ | /* Speed 'slow', 'fast', number of miliseconds (default:400) */ | ||
+ | 'slow' | ||
+ | ); | ||
+ | }); | ||
+ | |||
+ | //scrollTillBottom(); | ||
+ | } | ||
+ | |||
+ | </script> | ||
</html> | </html> |
Revision as of 09:46, 1 September 2017