JQuery Tool tips

Posted by kwek-kwek on Stack Overflow See other posts from Stack Overflow or by kwek-kwek
Published on 2010-04-08T19:11:17Z Indexed on 2010/04/08 19:13 UTC
Read the original article Hit count: 425

Filed under:
|
|

I want to create a tool tip for an image with a link now I had it working one but it doesn't work with the 2nd image.

Here is my Sample Code:

<!-- trigger element. a regular workable link --> 
<a id="test" title="Name - Title">Name</a> 

<!-- tooltip element --> 
<div class="tooltip"> 
 <div><span class="name">Name</span><br />
Title
<span><a href="#">more info»</a></span></div>
</div>

<!-- trigger element. a regular workable link -->
<a id="test2" title="Name - Title">Name</a> 

<!-- tooltip element --> 
<div class="tooltip2"> 
 <div><span class="name">Name</span><br />
Title
<span><a href="#">more info»</a></span></div>
</div>

and here is my script that makes it all happens:

<script>
// What is $(document).ready ? See: http://flowplayer.org/tools/using.html#document_ready

$(document).ready(function() {

 // enable tooltip for "test" element. use the "slide" effect
 $("#test").tooltip({ 
 effect: 'slide',
    offset: [50, 40] }); 

 $("#test2").tooltip2({ 
 effect: 'slide',
    offset: [50, 40] }); 
});
</script>

but not working please help.

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about JavaScript