diff --git a/frontend/web/js/new_script.js b/frontend/web/js/new_script.js index 6edc178..50fb4de 100755 --- a/frontend/web/js/new_script.js +++ b/frontend/web/js/new_script.js @@ -146,21 +146,34 @@ $(document).ready(function () { }); - $('#collection').click(function () { - $('.collection .new_collection').owlCarousel({ - navigation:true, - navigationText: [], - responsiveClass: true, - loop:true, - items:2, - itemsDesktop : false, - itemsDesktopSmall : false, - itemsTablet: false, - itemsMobile : false, - mouseDrag:false - - - }); - }) + + var windowWidth = $(window).width(); + if(windowWidth<=1200){ + restart() + } + $(window).resize(function () { + var windowWidth2 = $(window).width(); + if(windowWidth2<=1200){ + restart() + } + }) + function restart() { + $('#collection').click(function () { + $('.collection .new_collection').owlCarousel({ + navigation:true, + navigationText: [], + responsiveClass: true, + loop:true, + items:2, + itemsDesktop : false, + itemsDesktopSmall : false, + itemsTablet: false, + itemsMobile : false, + mouseDrag:false + + + }); + }) + } }) \ No newline at end of file -- libgit2 0.21.4