Template:Team:Valencia Biocampus/Templates/Header2

From 2014.igem.org

(Difference between revisions)
Line 161: Line 161:
}
}
</style>
</style>
-
<script type="text/javascript" src="http://code.jquery.com/jquery-1.7.1.min.js"></script>
+
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
-
<script type="text/javascript" src="https://2013.igem.org/wiki/index.php?title=Template:Team:Valencia_Biocampus/Templates/js/bootstrap&action=raw&ctype=text/javascript"></script>
+
<script type="text/javascript" src="https://2014.igem.org/wiki/index.php?title=Template:Team:Valencia_Biocampus/Templates/js/jqueryUI&action=raw&ctype=text/javascript"></script>
 +
<script type="text/javascript" src="https://2014.igem.org/wiki/index.php?title=Template:Team:Valencia_Biocampus/Templates/js/bootstrap&action=raw&ctype=text/javascript"></script>
 +
<script type="text/javascript" src="https://2013.igem.org/wiki/index.php?title=Template:Team:Valencia_Biocampus/Templates/js/slimbox2.js&action=raw&ctype=text/javascript"></script>
 +
<link rel="stylesheet" type="text/css" href="https://2013.igem.org/wiki/index.php?title=Template:Team:Valencia_Biocampus/Templates/css/slimbox2.css&action=raw&ctype=text/css" />
<script type="text/javascript">
<script type="text/javascript">
$(document).ready(function() {
$(document).ready(function() {
Line 196: Line 199:
     }
     }
   });
   });
-
  $(".container.withBackground").after("<div id='footer2'></div>");
 
});
});
</script>
</script>
Line 247: Line 249:
         if(typeof activeSection !== "undefined" ){     
         if(typeof activeSection !== "undefined" ){     
-
             $("#header-menu2 li.active").removeClass("active");
+
             $(".header-top-menu li.active").removeClass("active");
             $("#menu_a_"+activeSection).addClass("active");
             $("#menu_a_"+activeSection).addClass("active");
         }
         }
Line 261: Line 263:
</script>
</script>
 +
<style>
 +
.back-to-top {
 +
    cursor: pointer;
 +
    position: fixed;
 +
    bottom: 20px;
 +
    right: 20px;
 +
    display:none;
 +
    width:45px;
 +
    height:32px;
 +
    line-height:32px;
 +
    background: url('https://static.igem.org/mediawiki/2014/d/d2/Vbt_backtotoparrow.png') no-repeat center right;
 +
}
 +
</style>
 +
<a id="back-to-top" href="#" class="back-to-top" role="button" title="Click to return on the top page" data-toggle="tooltip" data-placement="left">  </a>
 +
<script type="text/javascript">
 +
$(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');
 +
 +
if ($('.tocWrapper').length ) {
 +
var tocWrapperOffsetLeft = $('.tocWrapper').offset().left;
 +
 +
$('.tocWrapper').affix({
 +
    offset: {
 +
      top: $('.tab-pane.active').offset().top
 +
    , bottom: function () {
 +
        return (this.bottom = $('.footer').outerHeight(true))
 +
      }
 +
    }
 +
  })
 +
/*
 +
$('.tocWrapper').on('affixed.bs.affix', function () {
 +
//alert(tocWrapperOffsetLeft );
 +
    $('.affix').css('left', tocWrapperOffsetLeft);
 +
})
 +
$('.tocWrapper').on('affixed-top.bs.affix', function () {
 +
    $('.affix-top').css('left', 'auto');
 +
})
 +
*/
 +
}
 +
 +
});
 +
 +
</script>
</html>
</html>

Revision as of 00:53, 14 October 2014