var leftpos; var toppos;
$(function(){
var tooltip = $("#tooltip");
$("#form_table").find("td[name=audit_lose]").each(function(){
$(this).bind('mouseover',function(e){
Mouse(e);
var v = $(this).find("input[name=audit_lose_hidden]")[0];
tooltip.html("未通過原因:"+$(v).val());
tooltip.css({ top: toppos ,left: leftpos });
tooltip.show();
}).bind('mouseout',function(){
tooltip.hide();
tooltip.html("");
});
});
rootNodeHiddenCreate();
});
var Mouse = function(e){
mouse = new MouseEvent(e);
leftpos = mouse.x + 2;
toppos = mouse.y + 2;
}
var MouseEvent = function(e) {
this.x = e.pageX
this.y = e.pageY
}
<div id="tooltip" style="border: 3px solid gray;position: absolute;padding: 5px;background-color: white;width: 200px;display:none;font-size: 12px;font-family:宋體;"></div> |
|