$(document).ready(function () { // 首頁主廣告 if($("#slideshow .slide-item").length >= 1){ $("#slideshow").owlCarousel({ loop : true, items : 1, nav : true, navText : ['',''], autoplay:true, autoplayTimeout:6000, dots: true, }); } // 首頁主廣告 if($(".slideshow-004").length!=0){ $(".today-wrapper").owlCarousel({ loop : true, responsive:{ 0:{ items : 2 }, 480:{ items : 1 } }, nav : true, navText : ['<','>'], autoplay:true, autoplayTimeout:6000, }); } // 新品登場 $('#slide_new').owlCarousel({ responsive:{ 0:{ items : 2, margin: 20, }, 576:{ items : 2, margin: 30, }, 768:{ items : 3, margin: 40, }, 992:{ items : 3, margin: 50, }, 1200:{ items : 4, margin: 60, } }, nav : true, navText : ['',''], dots: false }); // 熱銷商品 $('.oneline-fiveitem-01 .wrapper').owlCarousel({ responsive:{ 0:{ items : 2, margin: 20, }, 576:{ items : 2, margin: 30, }, 768:{ items : 3, margin: 40, }, 992:{ items : 3, margin: 50, }, 1200:{ items : 4, margin: 60, } }, nav : true, navText : ['',''], dots: false }); setTimeout(function(){ $('.oneline-fiveitem-01 .wrapper').fadeIn('slow',function(){ $(this).css({'opacity':1}); }); },1000) // 推薦商品 $('.tags-001 .wrapper').owlCarousel({ // loop : true, // items : 5, responsive:{ 0:{ items : 2 }, 660:{ items : 3 }, 768:{ items : 4 }, 1023:{ items : 5 } }, nav :true, // navText : ['',''] }); // 影音 $('.video_002 .wrapper').owlCarousel({ // loop : true, // items : 5, responsive:{ 0:{ items : 1 }, 660:{ items : 2 } }, nav : true, navText : ['',''] }); //首頁專題 $(".lookbook .picbox").owlCarousel({ loop : true, responsive:{ 0:{ items : 1 }, 480:{ items : 2 } }, nav : true, autoplay:true, autoplayTimeout:5000, }); //試用評價 $('.review-001 .warpper').owlCarousel({ loop : true, // items : 5, responsive:{ 0:{ items : 2 }, 660:{ items : 3 }, 768:{ items : 4 }, 1023:{ items : 5 } }, nav : true, navText : ['',''] }); //google評論 $(".review-carousel").owlCarousel({ responsive:{ 0:{ items : 1, margin: 0, }, 520:{ items : 2, margin: 10, }, 768:{ items : 3, margin: 20, }, 1200:{ items : 4, margin: 20, } }, nav : true, navText : ['',''], dots: false }) // var owl =$('.picbox'); // $('.picbox').owlCarousel(); $('.picbox').on('translated.owl.carousel',function(event){ var id = $(this).find('.active').eq(0).find('.pic-item').attr('did'); ajax_topic_content(id); }); function ajax_topic_content(topic_id){ $.post('/module/ajax/ajax_get_topic_content-p.php', {ID :topic_id}, function(h){ $("#topic_content").html(h.Content); }, 'json'); } });