【发布时间】:2012-09-29 23:06:18
【问题描述】:
不确定我是否设置错误 - 我似乎没有看到其他人遇到此问题,但我的 qTip 弹出窗口(所有 ajax 加载的内容)加载非常不规律,因为它们经常从在出现在正确位置之前离开屏幕。有没有我可能错过的简单解决方案?再次感谢您的帮助。
HTML 标记:
<span class="formInfo">
<a href="http://localhost/httpdocs/index.php/help/kc_dob" class="jTip" name="" id="dob_help">?</a>
</span>
qTip 初始化..
//set up for qtip
function initQtip()
{
$('a.jTip').each(function()
{
$(this).qtip(
{
content: {
// Set the text to an image HTML string with the correct src URL to the loading image you want to use
text: '<img src="/media/images/wait.gif" alt="Loading..." />',
url: $(this).attr('href') // Use the rel attribute of each element for the url to load
},
position: {
adjust: {
screen: true // Keep the tooltip on-screen at all times
}
},
show: {
when: 'click',
solo: true // Only show one tooltip at a time
},
hide: 'unfocus',
style: {
tip: true, // Apply a speech bubble tip to the tooltip at the designated tooltip corner
border: {
width: 10,
radius: 10
},
width: {
min: 200,
max: 500
},
name: 'light' // Use the default light style
}
});
//prevent default event on click
}).bind('click', function(event){ event.preventDefault(); return false; });
}
【问题讨论】:
标签: jquery jquery-plugins qtip