定位jQuery工具提示 [英] positioning jQuery tooltip
本文介绍了定位jQuery工具提示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试使用 jQuery UI Tooltip 和以下代码自定义工具提示的位置:
I'm trying to customise the positioning of my tooltips, using jQuery UI Tooltip and this code:
$(".karma").tooltip({
position: {
my: "center bottom",
at: "right top"
}
});
但是无论我对我的"和在……处"做什么,都不会改变.我在做什么错了?
But whatever I do to "my" and "at" nothing changes. What am I doing wrong?
推荐答案
您的代码没有错.但是,在看不到HTML的情况下,很难说出它为什么不起作用.
There is nothing wrong with your code. However, without seeing your HTML, it is hard to say why it isn't working.
确保已加载 jQueryUI 脚本: $(document).ready()
来包装代码.让我知道您是否还有其他问题.
Make sure you have loaded jQueryUI script: here. Also make to wrap your code with $(document).ready()
. Let me know if you have any other questions.
演示: http://jsfiddle.net/dirtyd77/SLGdE/16/
这篇关于定位jQuery工具提示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文