Team:NTU Taiwan/javascript/custom.js
From 2013.igem.org
Ddmail2009 (Talk | contribs) (Created page with "//sliders autoplay //intro slider $('#carousel_fade_intro').carousel({ interval: 2500, pause: "hover" }) //works sliders $('#carousel_horizontal_slide, #carousel_vertica...") |
Ddmail2009 (Talk | contribs) |
||
Line 24: | Line 24: | ||
} | } | ||
); | ); | ||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
//smooth scroll on page | //smooth scroll on page |
Latest revision as of 04:30, 28 July 2013
//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") });