Search code examples
jqueryhtmlcssjquery-pluginstipsy

Why is the Tipsy jQuery plugin not working for me?


I am using the latest version of Tipsy from here:https://github.com/jaz303/tipsy

I am including jquery.tipsy.js and tipsy.css, here is my html, the a href is an image:

<div class="social">
    <ul id="social">
        <li class="vimeo" title="Vimeo">
        <a href="#" class="vimeo" title="Vimeo"></a>
    </li>
    </ul>

and jQuery:

$(function() {
    $('.vimeo').tipsy({
        trigger: 'hover', 
        fade: true, 
        gravity: 'n'}
    );
});

Why is this not showing anything at all?


Solution

  • Cause you are not using any text in your anchor tags

    <div class="social">
    <ul id="social">
        <li class="vimeo" title="Vimeo">
    <a href="#" class="vimeo" title="Vimeo"></a>
    </li>
    </ul>
    

    Put some thing here >>

       <a href="#" class="vimeo" title="Vimeo">HERE</a>
    

    you need to check this : http://jsfiddle.net/f4RTs/

    Also your li and a tag has same class so you will see two titles on hover