Difference between revisions of "Template:IONIS Paris/JS"

 
(53 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
<html>
 
<html>
 
<head>
 
<head>
<script src="http://thebootstrapthemes.com/live/thebootstrapthemes-photography/assets/jquery.js"></script>
+
<script src="https://2015.igem.org/Template:IONIS_Paris/JS_Page?action=raw&ctype=text/javascript"></script>
<script src="http://thebootstrapthemes.com/live/thebootstrapthemes-photography/assets/wow/wow.min.js"></script>
+
<script src="https://2015.igem.org/Template:IONIS_Paris/JS_Page2?action=raw&ctype=text/javascript"></script>
<script src="http://thebootstrapthemes.com/live/thebootstrapthemes-photography/assets/bootstrap/js/bootstrap.js"></script>
+
<script src="https://2015.igem.org/Template:IONIS_Paris/JS_Page3?action=raw&ctype=text/javascript"></script>
<script src="http://thebootstrapthemes.com/live/thebootstrapthemes-photography/assets/mobile/touchSwipe.min.js"></script>
+
<script src="https://2015.igem.org/Template:IONIS_Paris/JS_Page4?action=raw&ctype=text/javascript"></script>
<script src="http://thebootstrapthemes.com/live/thebootstrapthemes-photography/assets/respond/respond.js"></script>
+
<script src="https://2015.igem.org/Template:IONIS_Paris/JS_Page5?action=raw&ctype=text/javascript"></script>
<script src="http://thebootstrapthemes.com/live/thebootstrapthemes-photography/assets/gallery/jquery.blueimp-gallery.min.js"></script>
+
<script src="https://2015.igem.org/Template:IONIS_Paris/JS_Page6?action=raw&ctype=text/javascript"></script>
  
 
<script  type="text/javascript">
 
<script  type="text/javascript">
jQuery(document).ready(function($) {
+
 
+
$(".scroll a, .navbar-brand, .gototop").click(function(event){ 
+
event.preventDefault();
+
$('html,body').animate({scrollTop:$(this.hash).offset().top}, 600,'swing');
+
$(".scroll li").removeClass('active');
+
$(this).parents('li').toggleClass('active');
+
});
+
});
+
  
 
var wow = new WOW(
 
var wow = new WOW(
Line 40: Line 32:
 
});
 
});
  
$(document).ready(
+
// Si on a des vidéos, on arrête le caroussel
  function () {
+
 
     $('nav > ul > li:has(ul) > a').attr('href', function (i, val) { return val + '#'; });
+
$(document).ready(function(){
   }
+
 
);
+
if ($('#myCarousel video').length != 0)
 +
{  
 +
     var ret = $('.carousel').carousel({
 +
    pause: true,
 +
    interval: false
 +
});
 +
   
 +
} else {
 +
   
 +
    $('#myCarousel').carousel('cycle');
 +
}
 +
});
 +
//NB
 +
 
 +
 
 +
// NOTEBOOK
 +
 
 +
$(document).ready(function(){
 +
 
 +
  var $timeline_block = $('.cd-timeline-block');
 +
 
 +
  //hide timeline blocks which are outside the viewport
 +
  $timeline_block.each(function() {
 +
    if ($(this).offset().top > $(window).scrollTop() + $(window).height() * 0.75) {
 +
      $(this).find('.cd-timeline-img, .cd-timeline-content').addClass('is-hidden');
 +
    }
 +
  });
 +
 
 +
  //on scolling, show/animate timeline blocks when enter the viewport
 +
  $(window).on('scroll', function() {
 +
    $timeline_block.each(function() {
 +
      if ($(this).offset().top <= $(window).scrollTop() + $(window).height() * 0.75 ||
 +
$(this).find('.cd-timeline-img').hasClass('is-hidden'))
 +
      {
 +
        $(this).find('.cd-timeline-img, .cd-timeline-content').removeClass('is-hidden').addClass('bounce-in');
 +
      }
 +
    });
 +
   });
 +
});
 +
 
 +
//GOTOP
 +
 
 +
 
 +
 +
  $(document).ready(function(){
 +
   
 +
    $(".gototop").hide();
 +
     
 +
    // faire apparaitre #gototop
 +
    $(function () {
 +
        $(window).scroll(function () {
 +
            if ($(this).scrollTop() > 450 ) {
 +
                $('.gototop').fadeIn(300);
 +
            } else {
 +
                $('.gototop').fadeOut(300);
 +
            }
 +
    });
 +
   
 +
 
 +
    });
 +
});
 +
 
 
</script>
 
</script>
 +
  
 
</head>
 
</head>
 
</html>
 
</html>

Latest revision as of 15:33, 16 September 2015