首次推送
This commit is contained in:
69
Mtxfw.VipSite/Scripts/base.js
Normal file
69
Mtxfw.VipSite/Scripts/base.js
Normal file
@@ -0,0 +1,69 @@
|
||||
$(document).ready(function(){
|
||||
//底部栏目
|
||||
var gd_body=$(document.body).height();
|
||||
var gd_footer=$("#footer").height();
|
||||
var gd_top=$("#top").height()+$("#header").height()+$("#topnav").height()+$("#search").height();
|
||||
var gd_window=$(window).height();
|
||||
if(gd_body<=gd_window){
|
||||
var gd_main=gd_window-gd_top-gd_footer-55;
|
||||
$("#main").css("height",gd_main);
|
||||
}
|
||||
$(window).resize(function() {
|
||||
var gd_window=$(window).height();
|
||||
if(gd_body<=gd_window){
|
||||
var gd_main=gd_window-gd_top-gd_footer-55;
|
||||
$("#main").css("height",gd_main);
|
||||
}
|
||||
});
|
||||
//通用下拉菜单
|
||||
$(".selecter").each(function(i,dom){
|
||||
$(dom).children("h2").mouseover(function(){
|
||||
$(dom).children("h2").addClass("hover");
|
||||
$(dom).children("ul").addClass("indextop");
|
||||
$(dom).children("ul").after("<iframe></iframe>");
|
||||
});
|
||||
$(dom).children("h2").mouseout(function(){
|
||||
$(dom).children("h2").removeClass("hover");
|
||||
$(dom).children("ul").removeClass("indextop");
|
||||
$(dom).children("iframe").remove();
|
||||
});
|
||||
$(dom).children("ul").mouseover(function(){
|
||||
$(dom).children("h2").addClass("hover");
|
||||
$(dom).children("ul").addClass("indextop");
|
||||
$(dom).children("ul").after("<iframe></iframe>");
|
||||
});
|
||||
$(dom).children("ul").mouseout(function(){
|
||||
$(dom).children("h2").removeClass("hover");
|
||||
$(dom).children("ul").removeClass("indextop");
|
||||
$(dom).children("iframe").remove();
|
||||
});
|
||||
});
|
||||
//topnav下拉菜单
|
||||
$("#topnav div").each(function(i,dom){
|
||||
var gd_iframe=$(dom).children("ul").height();
|
||||
$(dom).children("span").mouseover(function(){
|
||||
$(dom).children("span").addClass("hover");
|
||||
$(dom).children("ul").addClass("indextop");
|
||||
$(dom).children("ul").after("<iframe></iframe>");
|
||||
$(dom).children("iframe").css("height",gd_iframe);
|
||||
});
|
||||
$(dom).children("span").mouseout(function(){
|
||||
$(dom).children("span").removeClass("hover");
|
||||
$(dom).children("ul").removeClass("indextop");
|
||||
$(dom).children("iframe").remove();
|
||||
});
|
||||
$(dom).children("ul").mouseover(function(){
|
||||
$(dom).children("span").addClass("hover");
|
||||
$(dom).children("ul").addClass("indextop");
|
||||
$(dom).children("ul").after("<iframe></iframe>");
|
||||
$(dom).children("iframe").css("height",gd_iframe);
|
||||
});
|
||||
$(dom).children("ul").mouseout(function(){
|
||||
$(dom).children("span").removeClass("hover");
|
||||
$(dom).children("ul").removeClass("indextop");
|
||||
$(dom).children("iframe").remove();
|
||||
});
|
||||
});
|
||||
|
||||
//
|
||||
})
|
||||
Reference in New Issue
Block a user