Published On: lun, Abr 23rd, 2018

Llegan candidatos e invitados al primer debate presidencial 2018

‘);

googletag.pubads().refresh([slots[‘right3’]]);

}else{
$(“#div-dfp-right3”).hide();

}

return this;
}
});

sync1.owlCarousel({ singleItem : true, slideSpeed : 1000, navigation: true,
pagination:false, afterAction : syncPosition, responsiveRefreshRate : 200,lazyLoad : true,
});

sync2.owlCarousel({
items : 5,
itemsDesktop : [1199,5],
itemsDesktopSmall : [979,5],
itemsTablet : [768,5],
itemsMobile : [479,3],
pagination:false,
responsiveRefreshRate : 100,
afterInit : function(el){
el.find(“.owl-item”).eq(0).addClass(“synced”).addIndexImg().finishFn(0);
}
});

function syncPosition(el){
var current = this.currentItem;
$(“.carousel-small”)
.find(“.owl-item”)
.removeClass(“synced”)
.eq(current)
.addClass(“synced”).addIndexImg().finishFn(current);

if($(“.carousel-small”).data(“owlCarousel”) !== undefined){
center(current)
}
}

$(“.carousel-small”).on(“click”, “.owl-item”, function(e){
e.preventDefault();
var number = $(this).data(“owlItem”);
sync1.trigger(“owl.goTo”,number);
});

function center(number){
var sync2visible = sync2.data(“owlCarousel”).owl.visibleItems;
var num = number;
var found = false;
for(var i in sync2visible){
if(num === sync2visible[i]){
var found = true;
}
}

if(found===false){
if(num>sync2visible[sync2visible.length-1]){
sync2.trigger(“owl.goTo”, num – sync2visible.length+2)
}else{
if(num – 1 === -1){
num = 0;
}
sync2.trigger(“owl.goTo”, num);
}
} else if(num === sync2visible[sync2visible.length-1]){
sync2.trigger(“owl.goTo”, sync2visible[1])
} else if(num === sync2visible[0]){
sync2.trigger(“owl.goTo”, num-1)
}

}

setTimeout(function(){
var owl_item = 1;
$( “.carousel-small .owl-item” ).each(function( index ) {
if(owl_item % 6 == 0){
$(this).hide();
}
owl_item++;
});

}, 6000);

});

Leave a comment

XHTML: You can use these html tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>