public-health-ch/publichealth/static/js/min/main-min.js

1 line
445 B
JavaScript
Raw Normal View History

2017-02-06 13:35:58 +00:00
$(document).ready(function(){$("#myCarousel").carousel({interval:4e3});var a=!1;$("#myCarousel").on("click",".nav a",function(){a=!0,$(".nav li").removeClass("active"),$(this).parent().addClass("active")}).on("slid.bs.carousel",function(e){if(!a){var i=$(".nav").children().length-1,n=$(".nav li.active");n.removeClass("active").next().addClass("active");var s=parseInt(n.data("slide-to"));i==s&&$(".nav li").first().addClass("active")}a=!1})});