如何在负载上显示Tipsy工具提示并保持显示? [英] How do I show Tipsy tooltip on load and keep it shown?

查看:95
本文介绍了如何在负载上显示Tipsy工具提示并保持显示?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚在wordpress网站上安装了Tipsy工具提示(http://onehackoranother.com/projects/jquery/tipsy/)脚本,我只是想知道如何在页面加载时显示工具提示并保持它显示.

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>

提前谢谢! :)

推荐答案

首先,您必须指定要使用的属性,而不是 title ,对于您的情况,是 original-title .然后,必须将触发器设置为manual.最后,我们要显示完成时的工具提示.

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');

这篇关于如何在负载上显示Tipsy工具提示并保持显示?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆