开发者

Displaying image on tooltip?

In my application I would like to display an image on a tool tip.

How can I do this? Can you he开发者_如何学Pythonlp me, or provide me with any references?


Refer the below link for displaying the images in tooltip.

http://www.dyn-web.com/code/tooltips/


You can accomplish this using jQuery like so:

$("#img_id_here").hover(function()
{
    $(this).css('width', '400px');
});

<img src="whatever" onMouseOver="this.style.width='200px'" />

and in your CSS:

<style type="text/css">
    .img:hover /* you should apply img class to your image. */
    {
        width:400px;
    }
</style>


AFAIK, it's impossible with simple title attribute. You have to use something like this.


Did you take a look at the jQuery Tooltip plugin? That's where I'd start... :)


Please go through the below link for showing images in tool tip.

http://www.codeproject.com/KB/scripting/A_Simple_Tooltip.aspx

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜