开发者

control the length a title tooltip is shown

In IE the tooltip (title attribute) when you 开发者_运维问答hold over an a-tag disappear after a while. Can I somehow control for long it is shown? Or is it up to the browser to decide?

<a title="tooltip text">link</a>


Nope, this is totally up to the browser. You would have to use a custom tooltip script to control this kind of thing.


You can imitate it by using a javascript, for instance using jQuery

var count = 20000 // Seconds

$(a[title][original-title]).hover(function(){
   $(this).attr('data-title',$(this).attr('title')).attr('title',null); // Transfer to data-title and remove title attrib

},function(){
   $(this).fadeOUt(count,function(){
      //Done
   })
})

Now this is just an example of how you can look at things in a different way buut in regards to the the original title popup's length its not possible.

Tipsy Plugin is very good http://onehackoranother.com/projects/jquery/tipsy/ IMO

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜