Search code examples
javascriptjquerytooltiptipsy

Configuring Tipsy with title tags


I've tried implementing the Tipsy jQuery plugin on my website which is mean't to show title tags as pretty tooltips. But it doesn't appear to be working on my site, can anybody help?

I'd like a tooltip to be shown when I hover over the video thumbnails in the videos pod at...


Solution

  • You are using the following line to init your tooltip:

    $('.tipsy').tipsy();
    

    But as you can see the following img link does't have a class called tipsy.

    <a class="videobox various iframe" href="http://www.youtube.com/embed/I7_iD31Yhjg?autoplay=1&hd=1">
        <img width="74" height="56" title="Fear of Mobs Episode 155 - Murdering Ze Puppeh Doggies" src="http://i.ytimg.com/vi/I7_iD31Yhjg/1.jpg">
    </a>
    

    Update: Try to fix $('.tipsy').tipsy(); to $('a.videobox img').tipsy();

    If you want to change where it gets the tooltip text you can use something like the following.

    $('.tipsy').tipsy({
        title: 'alt' // it'll get the alt attr, you can use an attr or a callback
    });