From 815da69d34d1872c26b1b23845c828b5d2f8c358 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Andr=C3=A9s=20Rocha?= Date: Mon, 19 Nov 2012 14:08:00 -0500 Subject: [PATCH] Cleanup a bit javascript of news carousel on student dashboard --- lms/templates/dashboard.html | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lms/templates/dashboard.html b/lms/templates/dashboard.html index d2f98a723f..2fec75e1fe 100644 --- a/lms/templates/dashboard.html +++ b/lms/templates/dashboard.html @@ -40,9 +40,8 @@ if(event) { clearInterval(carouselTimer); carouselTimer = setInterval(nextCarouselPage, carouselDelay); - carouselIndex = $(this).closest('li').index(); transitionSpeed = 250; - $pageToShow = $('.news-carousel .page').eq($(this).closest('li').index()); + $pageToShow = $('.news-carousel .page').eq(index); $(this).addClass('current'); } else { transitionSpeed = 750;