$(function(){ //修改标题 //document.title="北京大学教育学院"; //加载头部 /* $.get("./seg/header.seg",function(data){ $("header").html(data); },"html");*/ /*var _filename_ = location.pathname.match(/[^\/]+$/); if (_filename_ != null && _filename_.length == 1) { var _id_ = _filename_[0].match(/^[^_\.]+/); if (_id_ != null && _id_.length > 0) { $("#" + _id_).addClass("current"); } }*/ /*$(".ssubNav").click(function(){ $("#mobileNav").toggle(300); });*/ $(".ssubNav").click(function(){ if($("#mobileNav").css("display")=="none") { $("#navline_1").addClass("navline1"); $("#navline_2").addClass("navline2"); $("#navline_3").addClass("navline3"); }else{ $("#navline_1").removeClass("navline1"); $("#navline_2").removeClass("navline2"); $("#navline_3").removeClass("navline3"); } $("#mobileNav").toggle(300); }); $(".header .nav #nav li").hover(function(){ $(this).children("ul").slideDown(200); }, function(){ $(this).children("ul").slideUp(200); } ); /*$(".header .logo a.sub_logo").hover(function(){ $(this).children("img").attr("src","img/gse-logo-grey.png"); }, function(){ $(this).children("img").attr("src","img/gse-logo.png"); } ); $(".header .logo1 a.sub_logo").hover(function(){ $(this).children("img").attr("src","../img/gse-logo-grey.png"); }, function(){ $(this).children("img").attr("src","../img/gse-logo.png"); } ); $(".header .logo2 a.sub_logo").hover(function(){ $(this).children("img").attr("src","../../img/gse-logo-grey.png"); }, function(){ $(this).children("img").attr("src","../../img/gse-logo.png"); } ); $(".header .logo3 a.sub_logo").hover(function(){ $(this).children("img").attr("src","../../../img/gse-logo-grey.png"); }, function(){ $(this).children("img").attr("src","../../../img/gse-logo.png"); } ); $(".header .logo a:first-child").hover(function(){ $(this).children("img").attr("src","img/pkulogo_grey.png"); }, function(){ $(this).children("img").attr("src","img/pkulogo_white.png"); } ); $(".header .logo1 a:first-child").hover(function(){ $(this).children("img").attr("src","../img/pkulogo_grey.png"); }, function(){ $(this).children("img").attr("src","../img/pkulogo_white.png"); } ); $(".header .logo2 a:first-child").hover(function(){ $(this).children("img").attr("src","../../img/pkulogo_grey.png"); }, function(){ $(this).children("img").attr("src","../../img/pkulogo_white.png"); } ); $(".header .logo3 a:first-child").hover(function(){ $(this).children("img").attr("src","../../../img/pkulogo_grey.png"); }, function(){ $(this).children("img").attr("src","../../../img/pkulogo_white.png"); } );*/ //加载尾部 /* $.get("./seg/footer.seg",function(data){ $("footer").html(data); },"html"); */ //加载右部 //$.get("./seg/right.seg",function(data){ // $("#right_col").html(data); //},"html"); autoHideMobileNav(); gotoTop(); }); function gotoTop(min_height){ //预定义返回顶部的html代码,它的css样式默认为不显示 var gotoTop_html = '