[英]Jquery tool tip not working
I know there are tons of similar questions already in the SO on this same topic. 我知道在SO中关于同一主题已经有很多类似的问题。 I have been through them all.
我经历了所有这些。 It seems I can't get this to work.
看来我无法解决这个问题。 Please let me know where I am going wrong!
请让我知道我要去哪里错了! This is how my code looks-
这就是我的代码的样子-
$("a").tooltip({
bodyHandler: function() {
return "Tool Tip is working!";
},
showURL: false
});
Here is a fiddle, The tool tip does not to work. 这是一个小提琴,工具提示不起作用。 Please help.
请帮忙。
http://jsfiddle.net/LE7V3/175/ http://jsfiddle.net/LE7V3/175/
I have updated the fiddle you provided http://jsfiddle.net/LE7V3/183/ 我已经更新了您提供的小提琴http://jsfiddle.net/LE7V3/183/
$( document ).tooltip();
<link rel="stylesheet" href="//code.jquery.com/ui/1.11.3/themes/smoothness/jquery-ui.css"> <script src="//code.jquery.com/jquery-1.10.2.js"></script> <script src="//code.jquery.com/ui/1.11.3/jquery-ui.js"></script> <a href="#" title="tooltip">Display Tooltip</a> <div id= "tt-content" style="width:250px; display:none" > <p>HTML TO BE DISPLAYED IN THE TOOLTIP.</p> <p>EVEN MORE HTML</P> </div>
here is the way tooltip works. 这是工具提示的工作方式。 you can use jquery on hover to set title of "a" tag instead of setting the tooltip itself .
您可以在悬停时使用jquery设置“ a”标签的标题,而无需设置工具提示本身。 this will make the tooltip dynamic as u want .
这将使您的工具提示动态化。
hope this is helpfull 希望这对您有所帮助
The tooltip plugin is not available. 工具提示插件不可用。 You have not included it.
您尚未包括在内。 if you debug
$("a").tooltip
you will see that its undefined
. 如果调试
$("a").tooltip
您将看到其undefined
。
@Arun P Johny has provided a jsFiddle with the solution in the comments. @Arun P Johny在评论中提供了jsFiddle及其解决方案。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.