解决日志中火狐title不自动换行问题

This commit is contained in:
zhanghongqing
2018-08-14 10:51:27 +08:00
parent 96b6b2abe5
commit 429024eab4
2 changed files with 8 additions and 4 deletions

View File

@@ -1,7 +1,13 @@
$(document).ready(function() {
// 界面鼠标悬停事件
$("table.logTb").find("td").not(":has(a)").bind("mouseover", function(){
this.title=$(this).html(this.innerHTML.trim()).text();
var str = $(this).html(this.innerHTML.trim()).text();
//解决火狐title不能自动换行
var count = Math.floor(str.length/64);
for(var i=1;i<=count;i++){
str=str.substring(0,i*64-1)+"\n"+str.substring(i*64-1);
}
this.title=str;
});
var fontSize = 0;
$("table.logTb th").each(function(){