Template:Team:Valencia Biocampus/Templates/Header

From 2014.igem.org

(Difference between revisions)
Line 113: Line 113:
MathJax.Hub.Config({
MathJax.Hub.Config({
   tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']]}
   tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']]}
 +
});
 +
$(document).ready(function(){
 +
    $(window).scroll(function () {
 +
            if ($(this).scrollTop() > 50) {
 +
                $('#back-to-top').fadeIn();
 +
            } else {
 +
                $('#back-to-top').fadeOut();
 +
            }
 +
        });
 +
        // scroll body to 0px on click
 +
        $('#back-to-top').click(function () {
 +
            $('#back-to-top').tooltip('hide');
 +
            $('body,html').animate({
 +
                scrollTop: 0
 +
            }, 800);
 +
            return false;
 +
        });
 +
       
 +
        $('#back-to-top').tooltip('show');
 +
});
});
</script>
</script>
Line 120: Line 140:
</html>
</html>
 +
<style>
 +
.back-to-top {
 +
    cursor: pointer;
 +
    position: fixed;
 +
    bottom: 20px;
 +
    right: 20px;
 +
    display:none;
 +
}
 +
</style>
 +
<a id="back-to-top" href="#" class="btn btn-primary btn-lg back-to-top" role="button" title="Click to return on the top page" data-toggle="tooltip" data-placement="left"><span class="glyphicon glyphicon-chevron-up"></span></a>

Revision as of 23:06, 12 October 2014

<style> .back-to-top {

   cursor: pointer;
   position: fixed;
   bottom: 20px;
   right: 20px;
   display:none;

} </style> <a id="back-to-top" href="#" class="btn btn-primary btn-lg back-to-top" role="button" title="Click to return on the top page" data-toggle="tooltip" data-placement="left"></a>