Skip to content
Snippets Groups Projects
Commit 2511c4dd authored by Carlos Andrés Rocha's avatar Carlos Andrés Rocha
Browse files

Clean carousel javascript

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