//下拉菜单 例调用:Nav('#nav'); function Nav(id){ var oNav = $(id); var aLi = oNav.find('li'); aLi.hover(function (){ $(this).addClass('on'); },function (){ $(this).removeClass('on'); }) }; // 二级页头部大图高度 function SubImgHeight(){ var iWSon = document.documentElement.clientWidth; var oSubbanner = document.getElementById('subbanner'); if(iWSon>=1920){ oSubbanner.style.height = 350+'px'; }else if(iWSon<1920){ oSubbanner.style.height = iWSon * (350/1920)+'px'; } window.onscroll = window.onresize = function (){ var iWSon = document.documentElement.clientWidth; if(iWSon>=1920){ oSubbanner.style.height = 350+'px'; }else if(iWSon<1920){ oSubbanner.style.height = iWSon * (350/1920)+'px'; } } } //gotop $('.goTop').click(function(){ $('body,html').stop().animate({scrollTop:0}); return false; }); //大图切换高度问题 function ImgHeight(){ function ImgHeight02(){ var iWSon = document.documentElement.clientWidth; if(iWSon>=1920){ // $('.Banner ').css('height', 500+'px'); $('.Banner .slides > li').css('height', 450+'px'); }else{ // $('.Banner').css('height',iWSon * (500/1920)+'px'); $('.Banner .slides > li').css('height', iWSon * (450/1920)+'px'); } } ImgHeight02(); $(window).resize(function(){ ImgHeight02(); }) }