Javascript代码
Introduction
Use simple jquery CSS to create a custom a tag title prompt to replace the browser's default behavior. As shown in the picture:
Javascript code
$(function() {
$("a[title]"). each(function() {
var a = $(this);
var title = a.attr('title');
if (title == undefined || title == "") return ;
a.data('title', title)
.removeAttr('title')
.hover(
function () {
var offset = a.offset();
$("").appendTo($("body")).html(title).css({ top: offset.top a.outerHeight( ) 10, left: offset.left a.outerWidth() 1 }).fadeIn(function () {
var pop = $(this);
setTimeout(function () { pop.remove(); } , pop.text().length*80);
});
},
function() { $("#anchortitlecontainer").remove(); }
);
});
});