?? utility.js
字號:
this.showTip = function(content){
jQuery(content).appendTo("body");
var obj="#"+jQuery(content).attr("id");
var myleft=(jQuery("body").width()-jQuery(obj).width())/2+jQuery("body").attr("scrollLeft");
var mytop=(jQuery("body").height()-jQuery(obj).height())/3+jQuery("body").attr("scrollTop");
jQuery(obj).css("left",myleft).css("top",mytop).fadeIn("slow");
window.setTimeout(function(){jQuery(obj).fadeOut(1000);},1000);
window.setTimeout(function(){jQuery(obj).remove();},2000);
};
this.tooltip = function(){
xOffset = 10;
yOffset = 20;
jQuery("[title!='']").each(function(){
jQuery(this).hover(function(e){
this.t = this.title;
this.title = "";
jQuery("body").append("<div id='tooltip'>"+ this.t +"</div>");
jQuery("#tooltip")
.css("top",(e.pageY - xOffset) + "px")
.css("left",(e.pageX + yOffset) + "px")
.fadeIn("fast");
},
function(){
this.title = this.t;
jQuery("#tooltip").remove();
});
jQuery(this).mousemove(function(e){
jQuery("#tooltip")
.css("top",(e.pageY - xOffset) + "px")
.css("left",(e.pageX + yOffset) + "px");
});
});
};
this.tooltipForm = function(){
xOffset = 10;
yOffset = 20;
jQuery("[name^='DATA_']").each(function(){
//初始化title信息
this.title = "名稱:"+this.title+" 序號:"+this.name.substr(5);
jQuery(this).hover(function(e){
this.t = this.title;
this.title = "";
jQuery("body").append("<p id='tooltip'>"+ this.t +"</p>");
jQuery("#tooltip")
.css("top",(e.pageY - xOffset) + "px")
.css("left",(e.pageX + yOffset) + "px")
.fadeIn("fast");
},
function(){
this.title = this.t;
jQuery("#tooltip").remove();
});
jQuery(this).mousemove(function(e){
jQuery("#tooltip")
.css("top",(e.pageY - xOffset) + "px")
.css("left",(e.pageX + yOffset) + "px");
});
});
};
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -