Commit 458a5616 by Carlos Andrés Rocha

Clean carousel javascript

parent 272d09ff
...@@ -21,7 +21,6 @@ ...@@ -21,7 +21,6 @@
$('.news-carousel .page').each(function() { $('.news-carousel .page').each(function() {
console.log($(this).outerHeight());
carouselPageHeight = Math.max($(this).outerHeight(), carouselPageHeight); carouselPageHeight = Math.max($(this).outerHeight(), carouselPageHeight);
}); });
$('.news-carousel .pages').css('height', carouselPageHeight); $('.news-carousel .pages').css('height', carouselPageHeight);
...@@ -33,13 +32,12 @@ ...@@ -33,13 +32,12 @@
setCarouselPage(null, carouselIndex); setCarouselPage(null, carouselIndex);
} }
function setCarouselPage(e, index) { function setCarouselPage(event, index) {
console.log('set');
var $pageToShow; var $pageToShow;
var transitionSpeed; var transitionSpeed;
$('.news-carousel .page-dots').find('.current').removeClass('current'); $('.news-carousel .page-dots').find('.current').removeClass('current');
if(e) { if(event) {
clearInterval(carouselTimer); clearInterval(carouselTimer);
carouselTimer = setInterval(nextCarouselPage, carouselDelay); carouselTimer = setInterval(nextCarouselPage, carouselDelay);
carouselIndex = $(this).closest('li').index(); carouselIndex = $(this).closest('li').index();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment