Galaxy S26 Ultra|網紅杜拜購Samsung新機搶先開箱 - EJ Tech
- css('z-index','2'); adwidth = $('.
- height(); newgetwidth=getwidthx; newgetheight=getheight; newmargintop=(adheight/2)-adheight; if(getwidth<640){ $('.
- css('transform-origin','0px 50%'); $('#ad_popup_closebar div').
- css('font-size','13px'); } });
$(document).ready(function(){
setTimeout(function() {
if($('.ad-content iframe').length){
$('.overlay-bg').show();
//$('#wrapper').css('z-index','2');
adwidth = $('.overlay-content').width();
adheight = $('.overlay-content').height();
getwidth = $('.overlay-bg').width();
getheight = $('.overlay-bg').height();
newgetwidth=getwidthx;
newgetheight=getheight;
newmargintop=(adheight/2)-adheight;
if(getwidth<640){
$('.overlay-content').css('width',newgetwidth)
$('.ad-framecontent').css('width',newgetwidth).css('overflow','auto');
}else if( getwidth>640){
$('.overlay-content').css('width','640px')
$('.ad-framecontent').css('width','640px').css('overflow','auto');
};
if(getheight<480){
$('.overlay-content').css('height',newgetheight).css('margin-top',newmargintop);
$('.ad-framecontent').css('height',newgetheight).css('overflow','auto')
} else if(getheight>480){
$('.overlay-content').css('height','480px').css('margin-top',newmargintop);
$('.ad-framecontent').css('height','480px').css('overflow','auto')
};
var click_ipad_body = document.getElementsByTagName('body')[0];
if ("ontouchstart" in window) {
click_ipad_body.ontouchstart = function(){
$('.overlay-bg').fadeOut(1000, function(){ $(this).remove();}) };
};
$("body").click(function(event){
if ($(event.target).closest('.overlay-content').length == 0){
$('.overlay-bg').remove();
};
});
};
}, 500);
$('#popup_closebtn').click(function(){
$('.overlay-bg').css('display','none');
$('.overlay-bg').remove();
});
var _screenWidth = (window.innerWidth > 0) ? window.innerWidth : screen.width;
if(_screenWidth<=680){
$('.overlay-content').css('scale','0.5');
$('.overlay-content').css('transform-origin','0px 50%');
$('#ad_popup_closebar div').css('font-size','13px');
}
});











