Chloroplast (Talk | contribs) |
Chloroplast (Talk | contribs) |
||
(One intermediate revision by the same user not shown) | |||
Line 1,721: | Line 1,721: | ||
$('#sci_logo').css('display', "none"); | $('#sci_logo').css('display', "none"); | ||
$('#sps_logo').css('display', "none"); | $('#sps_logo').css('display', "none"); | ||
+ | $('.canvas_parts').css('display', "none"); | ||
}else{ | }else{ | ||
$('#nus_logo').css('left', "0%"); | $('#nus_logo').css('left', "0%"); | ||
$('#sci_logo').css('display', "block"); | $('#sci_logo').css('display', "block"); | ||
$('#sps_logo').css('display', "block"); | $('#sps_logo').css('display', "block"); | ||
+ | $('.canvas_parts').css('display', "block"); | ||
} | } | ||
}; | }; | ||
Line 2,126: | Line 2,128: | ||
$sidescroll.init(); | $sidescroll.init(); | ||
+ | }); | ||
+ | $(document).ready(function() { | ||
+ | // Show or hide the sticky footer button | ||
+ | $(window).scroll(function() { | ||
+ | if ($(this).scrollTop() > 200) { | ||
+ | $('.go-top').fadeIn(200); | ||
+ | } else { | ||
+ | $('.go-top').fadeOut(200); | ||
+ | } | ||
+ | }); | ||
+ | |||
+ | // Animate the scroll to top | ||
+ | $('.go-top').click(function(event) { | ||
+ | event.preventDefault(); | ||
+ | |||
+ | $('html, body').animate({scrollTop: 0}, 300); | ||
+ | }) | ||
}); | }); | ||
</script> | </script> | ||
</html> | </html> |
Latest revision as of 07:39, 16 October 2016