$(function(){
$(".other_l").owlCarousel({
nav : true,
responsive:{
0:{
items : 1
},
480:{
items : 2
},
560:{
items : 3
}
},
});
$("#Serial_Works").on('click','.other-item',function(){
var ID = $(this).data('id');
$('.popupbox').find('.Collect_BT').attr('Collection_ID',ID);
$.ajax({
url:'/witness/ajax/popupbox.php',
type:"POST",
cache:false,
async:false,
data:{'ID':ID},
dataType: 'html',
error:function(d){
alert(d.responseText);
},
success:function(d){
$('.popupbox .Collect_BT').attr('Collection_ID',ID);
$('.popupbox .popup-wrapper').html(d);
$(".popupbox .heartList").owlCarousel({
nav : true,
responsive:{
0:{
items : 3
},
768:{
items : 4
},
1024:{
items : 6
}
},
});
$('.popupbox').fadeIn();
$('.popupbox .popup-wrapper').scrollTop(0);
}
})
});
$(".popup-close").on('click',function(){
$('.popupbox').fadeOut();
$('.popupbox').promise().done(function(){
$('.popupbox .popup-wrapper').html('');
})
});
$('.popupbox').on('click','.pop-plus',function(){
$(this).addClass('pop-minus').removeClass('pop-plus').html(' 圖片縮小');
$('.comic-box').css('max-width','none');
}).on('click','.pop-minus',function(){
$(this).addClass('pop-plus').removeClass('pop-minus').html(' 圖片放大');
$('.comic-box').css('max-width','430px');
});
$('.popupbox').find('.pop-emotion').click(function(){
$('.popupbox .popup-wrapper').animate({scrollTop: $('.popupbox .popup-wrapper').find('.heartList').offset().top}, 500);
})
$('.popupbox').find('.pop-message').click(function(){
$('.popupbox .popup-wrapper').animate({scrollTop: $('.popupbox .popup-wrapper').find('#Comment').offset().top}, 500);
})
$('.popupbox .popup-wrapper').on('mousedown','img',function(){ return false; })
$('.popupbox .popup-wrapper').on('contextmenu','img',function(){ return false; })
});