$(function(){ if (screen.width == 1440) { $(".siderNav").css("height","355px"); $(".u_mallSider").css("height","580px") }else if (screen.width == 1400) { $(".siderNav").css("height","330px"); $(".u_mallSider").css("height","465px") }else if (screen.width == 1366) { $(".siderNav").css("height","300px"); $(".u_mallSider").css("height","505px") }else if (screen.width == 1360) { $(".siderNav").css("height","300px"); $(".u_mallSider").css("height","505px") } var jWindow = $(window); // jWindow.scroll(function(){ // var scrollHeight = jWindow.scrollTop(); // var screenHeight = jWindow.height(); // var sideHeight = $('#J_mallSider').height(); // var headHeight = $('#header').height(); // var footHeight = $('#footer').height(); // if(screenHeight>headHeight+sideHeight+200){ // if(scrollHeight>headHeight){ // $('#J_mallSider').css({ // 'position':'fixed', // 'top':0, // 'z-index':'9', // }); // }else{ // $('#J_mallSider').css({ // 'position':'static', // }); // } // }else{ // if(scrollHeight+screenHeight>headHeight+sideHeight){ // $('#J_mallSider').css({ // 'position':'fixed', // 'top':-(sideHeight+headHeight-screenHeight), // 'z-index':'9', // }); // }else{ // $('#J_mallSider').css({ // 'position':'static', // }); // } // } // $('.comWnd-wrapper').center(); // $('.comWnd-fail').center(); // }); jWindow.resize(function(){ jWindow.trigger('scroll'); }); jWindow.load(function(){ jWindow.trigger('scroll'); }); jQuery.fn.center = function(){ this.css({ 'position':'absolute', 'top':($(window).height()-this.height())/2+$(window).scrollTop()+'px', 'left':($(window).width()-this.width())/2+80+$(window).scrollLeft()+'px', }); return this; }; $(".in_code").mouseenter(function(){ $(".code_show").show(); }) $(".in_code").mouseleave(function(){ $(".code_show").hide(); }) $(".look").click(function(){ $(".heigh_con").css('height','auto'); $(this).hide(); }) })