bgstr= '
';imgstr= '';if ($('#ImgZoomInBG').length < 1) {
$('body').append(bgstr);
}if ($('#ImgZoomInImage').length < 1) {
$('body').append(imgstr);
}else{
$('#ImgZoomInImage').attr('src', $(this).attr('src'));
}
$('#ImgZoomInBG').css('top', scroll_h+'px');
$('#ImgZoomInBG').css('width', '100%');
$('#ImgZoomInBG').css('height', window_h+'px');
$('#ImgZoomInImage').css('width', '100%');
$('#ImgZoomInImage').css('height', (window_h/2)+'px');
$('#ImgZoomInImage').css('top', (scroll_h+window_h/4)+'px');
$('#ImgZoomInBG').show();
$('#ImgZoomInImage').show();
};//PC端
$(document).ready(function() {
$(document).on('click','.item_img',function(){
$(this).ImgZoomIn();
$(document.body).css({"overflow-x":"hidden","overflow-y":"hidden"});
});
$(document).on('click','#ImgZoomInImage',function(){
$('#ImgZoomInImage').hide();
$('#ImgZoomInBG').hide();
$(document.body).css({"overflow-x":"auto","overflow-y":"auto"});
});
});//手机端
$(document).ready(function() {
$(document).on('touchend','.item_img',function(t){
$(this).ImgZoomIn();
document.ontouchstart=function(){return false;
}
t.preventDefault();
});
$(document).on('touchend','#ImgZoomInImage',function(t){
$('#ImgZoomInImage').hide();
$('#ImgZoomInBG').hide();
document.ontouchstart=function(){return true;
}
t.preventDefault();
});
});