tags:

views:

138

answers:

3

Is it possible to show a tooltip without making a link?

For example, I have the following code without a link:

<ul class="letters" title="This is the title">
<li>A</li>
<li>B</li>
<li>C</li>
</ul>

So how can I show the tooltip "This is the title" when I mouse over on it?

Btw, I don't want to use any tooltip plugin.

A: 

Get the title attribute

title = $('.letters').attr('title');

And work it from there. There's no magical "title_tooltip_popup()" function in Jquery, so you might consider making your own or using a plugin.


Remember that if you're working with classes this selector

$('.letters')

might reference more than 1 element

Ben
my wrong comment...
bloggerious
$('.letters').hover(function(){ title = $(this).attr('title');});
Ben
A: 

Reffer following link

Ref:- http://jquery.bassistance.de/tooltip/demo/

Salil
as much as possible, I don't want to use any plugin
bloggerious
+1  A: 
T.J. Crowder