Commit ac806f6e by Carlos Andrés Rocha

Cleanup a bit javascript of news carousel on student dashboard

parent 13aa0523
...@@ -40,9 +40,8 @@ ...@@ -40,9 +40,8 @@
if(event) { if(event) {
clearInterval(carouselTimer); clearInterval(carouselTimer);
carouselTimer = setInterval(nextCarouselPage, carouselDelay); carouselTimer = setInterval(nextCarouselPage, carouselDelay);
carouselIndex = $(this).closest('li').index();
transitionSpeed = 250; transitionSpeed = 250;
$pageToShow = $('.news-carousel .page').eq($(this).closest('li').index()); $pageToShow = $('.news-carousel .page').eq(index);
$(this).addClass('current'); $(this).addClass('current');
} else { } else {
transitionSpeed = 750; transitionSpeed = 750;
......
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