$(document).ready(function () {
// 首頁主廣告
if($("#slideshow .slide-item").length>=1){
$("#slideshow").owlCarousel({
loop : true,
items : 1,
nav : true,
navText : ['',''],
dots:true,
autoplay:true,
navSpeed:1000,
autoplayTimeout:8000,
autoplaySpeed:1000,
dotsSpeed:1000,
});
}
// 首頁主廣告
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({
// loop : true,
// items : 5,
responsive:{
0:{
items : 2
},
660:{
items : 3
},
768:{
items : 4
},
1023:{
items : 5
}
},
nav : true,
navText : ['','']
});
setTimeout(function(){
$('#slide_new').fadeIn('slow',function(){
$(this).css({'opacity':1});
});
},1000)
// 熱銷商品
$('.oneline-fiveitem-01 .wrapper').owlCarousel({
// items : 5,
responsive:{
0:{
items : 2
},
660:{
items : 3
},
768:{
items : 4
},
1023:{
items : 5
}
},
nav : true,
navText : ['','']
});
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,
navText : ['',''],
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 : ['','']
});
// 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){
$.ajax({
url:"/module/ajax/ajax_get_topic_content-p.php",
type:"POST",
cache:false,
async:false,
dataType:"json",
data:{ID:topic_id},
success:function(d){
$("#topic_content").html(d.Content);
}
});
// $.post('/module/ajax/ajax_get_topic_content-p.php', {ID :topic_id}, function(h){
// $("#topic_content").html(h.Content);
// }, 'json');
}
});