我在 iframe 中使用 jQuery qTip2 但由于我受限于 iframe 宽度和高度的大小,无论如何我可以让内容实际出现在 iframe 的顶部,即在 iframe 的父窗口内而不是在实际的 iframe 本身?
这样,我就不受 iframe 大小的限制了。
这是我作为 iframe 的一部分使用的当前代码:
$(document).ready(function() {
$('img[title]').qtip({
content: {
text: false, // Use each elements title attribute
title: {
text: 'Error',
button: 'Close'
}
},
hide: {
event: false
},
style: {
classes: 'ui-tooltip-dark ui-tooltip-rounded',
height: 5,
width: 500
},
position: {
my: 'bottom right',
at: 'top left'
}
});
});