ap_list_functions_loaded.push(
function(){
if($('#category-products').parents('.tab-pane').length)
{
if(!$('#category-products').parents('.tab-pane').hasClass('active'))
{
var width_owl_active_tab = $('#category-products').parents('.tab-pane').siblings('.active').find('.owl-carousel').width();
$('#category-products').width(width_owl_active_tab);
}
}
$('#category-products').imagesLoaded( function() {
$('#category-products').owlCarousel({
direction:'ltr',
items : 5,
itemsCustom : false,
itemsXDesktop : [1500, 5],
itemsDesktop : [1200,4],
itemsDesktopSmall : [992, 3],
itemsTablet : [768, 2],
itemsMobile : [480, 1],
singleItem : false, // true : show only 1 item
itemsScaleUp : false,
slideSpeed : 200, // change speed when drag and drop a item
paginationSpeed :800, // change speed when go next page
autoPlay : false, // time to show each item
stopOnHover : false,
navigation : true,
navigationText : ["‹", "›"],
scrollPerPage :true,
responsive :true,
pagination : false,
paginationNumbers : false,
addClassActive : true,
mouseDrag : true,
touchDrag : true,
addClassActive : true,
afterInit: OwlLoaded,
afterAction : SetOwlCarouselFirstLast,
});
});
}
);
function OwlLoaded(el){
el.removeClass('owl-loading').addClass('owl-loaded').parents('.owl-row').addClass('hide-loading');
if ($(el).parents('.tab-pane').length && !$(el).parents('.tab-pane').hasClass('active'))
el.width('100%');
};