Team:NTU Taiwan/javascript/custom.js

From 2013.igem.org

Revision as of 04:30, 28 July 2013 by Ddmail2009 (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

//sliders autoplay //intro slider $('#carousel_fade_intro').carousel({ interval: 2500, pause: "hover" }) //works sliders $('#carousel_horizontal_slide, #carousel_vertical_slide, #carousel_fade_1, #carousel_fade_2').carousel({ interval: false })

//make section height of window $(function(){ $('#intro').css({'height':($(window).height())+'px'}); $(window).resize(function(){ $('#intro').css({'height':($(window).height())+'px'}); }); });

//custom scrollbar $(document).ready( function() { $("html").niceScroll(); } );

//smooth scroll on page $(function() { $('#more a, .nav a, .nav li a, .brand, #footer li a').bind('click',function(event){ var $anchor = $(this);

$('[data-spy="scroll"]').each(function () { var $spy = $(this).scrollspy('refresh') });

$('html, body').stop().animate({ scrollTop: $($anchor.attr('href')).offset().top -61 }, 1500,'easeInOutExpo');

event.preventDefault(); }); });

//gallery image hover tooltip trigger $("[data-thumb=tooltip]").tooltip();

//collapse menu on click on mobile and tablet devices $('.nav a').click(function () { $(".nav-collapse").collapse("hide") });