owl slider not working in bootsrap solution

initialize_owl($('#owl1'));

$('a[href="#book"]').on('shown.bs.tab', function () {
    initialize_owl($('#owl1'));
}).on('hide.bs.tab', function () {
    destroy_owl($('#owl1'));
});

$('a[href="#package"]').on('shown.bs.tab', function () {
    initialize_owl($('#owl2'));
}).on('hide.bs.tab', function () {
    destroy_owl($('#owl2'));
});

$('a[href="#sound"]').on('shown.bs.tab', function () {
    initialize_owl($('#owl3'));
}).on('hide.bs.tab', function () {
    destroy_owl($('#owl3'));
});

function initialize_owl(el) {


    el.owlCarousel({
        loop:true,
        margin:10,
        rtl:true,
        nav:false,
        dots:false,
        lazyLoad:true,
        responsive:{
            0:{
                items:2
            },
            480:{
                items:3
            },
            767:{
                items:4,
                margin:30
            }

        }
    });
}

function destroy_owl(el) {
    el.trigger("destroy.owl.carousel");
    el.find('.owl-stage-outer').children(':eq(0)').unwrap();
}
Share on Google Plus

About Amit

This is a short description in the author block about the author. You edit it by entering text in the "Biographical Info" field in the user admin panel.
    Blogger Comment
    Facebook Comment

0 comments:

Post a Comment