1 line
445 B
JavaScript
1 line
445 B
JavaScript
|
$(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})});
|