Commit 82262b4d by Carlos Andrés Rocha

Fix bug in news carousel on student dashboard

Clicking on the "bullet" selectors was not working correctly.
parent 03c8c54e
...@@ -40,8 +40,9 @@ ...@@ -40,8 +40,9 @@
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(index); $pageToShow = $('.news-carousel .page').eq(carouselIndex);
$(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