Template:Team:DukeProtocol/CSS

From 2014.igem.org

(Difference between revisions)
 
Line 93: Line 93:
</style>
</style>
</head>
</head>
-
<body>
 
-
<div class="navleftholder">
 
-
<ul class="navleft">
 
-
  <li><a id="navleftsub1" class="navleftsub" href="#board1">Timeline</a></li>
 
-
  <li><a id="navleftsub2" class="navleftsub" href="#board2">Attributions</a></li>
 
-
  <li><a id="navleftsub3" class="navleftsub" href="#board3">Protocols</a></li>
 
-
  <li><a id="navleftsub4" class="navleftsub" href="#board4">References</a></li>
 
-
  <li><a id="navleftsub5" class="navleftsub" href="#board5">Acknowledgements</a></li>
 
-
</ul></div>
 
-
<script type="text/javascript">
 
-
$(function(){
 
-
var board1_top = $("#board1").offset().top;
 
-
var board2_top = $("#board2").offset().top;
 
-
var board3_top = $("#board3").offset().top;
 
-
var board4_top = $("#board4").offset().top;
 
-
var board5_top = $("#board5").offset().top;
 
-
//alert(tops);
 
-
$(window).scroll(function(){
 
-
var scroH = $(this).scrollTop();
 
-
var screenH = window.innerHeight * 0.5;
 
-
if(scroH>=board5_top- screenH){
 
-
set_cur("#navleftsub5");
 
-
}else if(scroH>=board4_top- screenH){
 
-
set_cur("#navleftsub4");
 
-
}else if(scroH>=board3_top- screenH){
 
-
set_cur("#navleftsub3");
 
-
}else if(scroH>=board2_top- screenH){
 
-
set_cur("#navleftsub2");
 
-
}else if(scroH>=board1_top- screenH){
 
-
set_cur("#navleftsub1");
 
-
}
 
-
});
 
-
 
-
$(".navleft li a").click(function() {
 
-
var el = $(this).attr('class');
 
-
    $('html, body').animate({
 
-
        scrollTop: $("#"+el).offset().top
 
-
    }, 300);
 
-
$(this).addClass("cur").parent().siblings().find("a").removeClass("cur");
 
-
});
 
-
 
-
});
 
-
function set_cur(n){
 
-
if($(".navleft a").hasClass("cur")){
 
-
$(".navleft a").removeClass("cur");
 
-
}
 
-
$(".navleft a"+n).addClass("cur");
 
-
}
 
-
</script>
 
-
<script type="text/javascript">
 
-
$(function(){
 
-
$('#myGallery1').galleryView({
 
-
          panel_width: 480,
 
-
            panel_height: 256,
 
-
      autoplay: true,
 
-
      show_infobar: true,
 
-
      infobar_opacity: 0.8,
 
-
      pause_on_hover: true,
 
-
      enable_overlays: true,
 
-
      panel_scale: 'crop',
 
-
show_captions: true,
 
-
easing: 'swing',
 
-
pan_images: true,
 
-
      });
 
-
$('#myGallery2').galleryView({
 
-
          panel_width: 480,
 
-
            panel_height: 256,
 
-
      autoplay: true,
 
-
      show_infobar: true,
 
-
      infobar_opacity: 0.8,
 
-
      pause_on_hover: true,
 
-
      enable_overlays: true,
 
-
      panel_scale: 'crop',
 
-
show_captions: true,
 
-
easing: 'swing',
 
-
pan_images: true,
 
-
      });
 
-
$('#myGallery3').galleryView({
 
-
          panel_width: 480,
 
-
            panel_height: 256,
 
-
      autoplay: true,
 
-
      show_infobar: true,
 
-
      infobar_opacity: 0.8,
 
-
      pause_on_hover: true,
 
-
      enable_overlays: true,
 
-
      panel_scale: 'crop',
 
-
show_captions: true,
 
-
easing: 'swing',
 
-
pan_images: true,
 
-
      });
 
-
$('#myGallery4').galleryView({
 
-
          panel_width: 480,
 
-
            panel_height: 256,
 
-
      autoplay: true,
 
-
      show_infobar: true,
 
-
      infobar_opacity: 0.8,
 
-
      pause_on_hover: true,
 
-
      enable_overlays: true,
 
-
      panel_scale: 'crop',
 
-
show_captions: true,
 
-
easing: 'swing',
 
-
pan_images: true,
 
-
      });
 
-
$('#myGallery5').galleryView({
 
-
            panel_width: 480,
 
-
            panel_height: 256,
 
-
      autoplay: true,
 
-
      show_infobar: true,
 
-
      infobar_opacity: 0.8,
 
-
      pause_on_hover: true,
 
-
      enable_overlays: true,
 
-
      panel_scale: 'crop',
 
-
show_captions: true,
 
-
easing: 'swing',
 
-
pan_images: true,
 
-
      });
 
-
});
 
-
</script>
 
-
</body>
 
</html>
</html>

Latest revision as of 16:57, 6 October 2014