Search code examples
wordpresstooltipjquery-tooltiptipsy

How do I show Tipsy tooltip on load and keep it shown?


I've just installed Tipsy Tooltip (http://onehackoranother.com/projects/jquery/tipsy/) script on my wordpress site, I'm just wondering how I go about showing the tooltip on page load and keeping it shown.

This is the code I have so far;

<a id="logo" href="#" original-title="Happy <?php echo date("l"); ?>"></a>
<script type='text/javascript'>
  $("a#logo").tipsy('show');
</script>

Thanks in advance! :)


Solution

  • Well, first you have to specify the attribute you want to use instead of title, in your case original-title. Then the trigger must be set to manual. And last we want to show the tooltip, when this is done.

     $('#logo').tipsy({trigger: 'manual', title: 'original-title'});
     $('#logo').tipsy('show');