Tooltip using Javascript

The hyperlink tag has an attribute “title” and if you write something in the title, it will be displayed in your webpage while you place your cursor on the link. Lets try this,

A Sample WebPage (dont click on it, just put your curson on the link)

Have you noticed that, a tip appears while you place your cursor on the above link. So what is the secret? It is the “title” attribute of hyperlink tag <a>. Look at the following example.
<a href=”http://amar-desh.net ”  title=”after clicking here this will drive you to..”>A Sample WebPage</a>

Now this tooltip is very simple and only bounds to hyperlink tag. If you want to design an inovative tooltip using simple javascript, the following link can be helpful for you,

Designing a tooltip using javascript

or, http://amar-desh.net/myworks/javascript/ToolTip_using_javascript.aspx

The link also has a live demonstration, so it will be worthy to check it.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s