//鑾峰彇褰撳墠椤甸潰鐨勭缉鏀惧€ function detectZoom() { var ratio = 0, screen = window.screen, ua = navigator.userAgent.toLowerCase(); if (window.devicePixelRatio !== undefined) { ratio = window.devicePixelRatio; } else if (~ua.indexOf('msie')) { if (screen.deviceXDPI && screen.logicalXDPI) { ratio = screen.deviceXDPI / screen.logicalXDPI; } } else if (window.outerWidth !== undefined && window.innerWidth !== undefined) { ratio = window.outerWidth / window.innerWidth; } if (ratio) { ratio = Math.round(ratio * 100); } return ratio; } //================ $(function(){ //alert($(window).height()); //alert($('.headerbg').height()) var zheight = $(window).height(); var hheight = $('.headerbg').height(); if(detectZoom() > 100 && detectZoom() < 126){ $('html').css('zoom','84%'); $('.er_banner').css('height',((zheight*0.16)+zheight) - hheight +20 + 'px'); }else if(detectZoom() > 125 && detectZoom() < 151){ $('html').css('zoom','75%'); //alert(((zheight*0.25)+zheight) - (hheight*0.75)) $('.er_banner').css('height',((zheight*0.25)+zheight) - (hheight*0.25)-10 + 'px'); }else if(detectZoom() > 150 && detectZoom() < 176){ $('html').css('zoom','60%'); $('.er_banner').css('height',((zheight*0.4)+zheight) - (hheight*0.4)-10 + 'px'); } if(zheight < 800 && detectZoom() == 100){ //alert($(window).height()); $('.er_banner').css('height',zheight - hheight + 'px'); } var widths = $(window).width(); if(widths > 750){ }else{ } //============================================ $('.menu').on('click',function(){ $('.wap_bg').addClass('show'); }); $('.times').on('click',function(){ $('.wap_bg').removeClass('show'); }); //============================================ $('.erans').on('click',function(){ $(this).addClass('on'); $(this).find('i').removeClass('jasolar-angle-right'); $(this).find('i').addClass('jasolar-angle-down'); $(this).siblings('.ernav').slideDown('slow'); $(this).parents('.lilst').siblings().find('.erans').removeClass('on'); $(this).parents('.lilst').siblings().find('.ernav').slideUp('slow'); $(this).parents('.lilst').siblings().find('.erans').find('i').removeClass('jasolar-angle-down'); $(this).parents('.lilst').siblings().find('.erans').find('i').addClass('jasolar-angle-right'); }); });