开发者

Programmatically displaying HTML element titles

Is there a javascript way to display or hide element title (defined as an html attribute), as if the mouse was hovering above said dom element, without actually invo开发者_如何学运维lving the mouse?

Thanks in advance.


Not with native tooltips/titles. But there are jQuery plugins like this which let you cutomize and control them.


I would use an absolutely positioned DIV that looks like the native tooltip and contains the same text as an alternative. It should be fairly trivial to loop through all elements and create a DIV for each one that has a title attribute.

Very little hassle and no JavaScript plugins required.


You can make a tooltip layout (div with border) yourself, and show it when you want with jQuery. You can select a link element with a title like this:

a[title] {}
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜