Qtip内容预渲染提供JavaScript运行时错误:
我正在使用qtip1.0。我需要在函数调用中显示qtip 如果我使用contentprerender:true,它会给出下面提到的错误 JavaScript运行时错误:无法获取的属性“nodeName” 未定义或空引用 我已经在我的母版页中添加了这个Qtip内容预渲染提供JavaScript运行时错误:,javascript,jquery,qtip,Javascript,Jquery,Qtip,我正在使用qtip1.0。我需要在函数调用中显示qtip 如果我使用contentprerender:true,它会给出下面提到的错误 JavaScript运行时错误:无法获取的属性“nodeName” 未定义或空引用 我已经在我的母版页中添加了这个 <script src="Scripts/jquery.qtip-1.0.0-rc3.min.js" type="text/javascript"></script> 我的页面文档就绪函数中有以下代码 $('#pr
<script src="Scripts/jquery.qtip-1.0.0-rc3.min.js" type="text/javascript"></script>
我的页面文档就绪函数中有以下代码
$('#printDiv').qtip(
{
show: {
event: 'click', // Show it on click
solo: true // And hide all other tooltips
},
content: {
prerender: true,
title: {
text: 'Core Details',
button: 'Close'
},
text: 'Show the content'
},
position: {
target: $(this).closest($(document.body)), // Position it via the document body...
corner: 'center' // ...at the center of the viewport
},
style: {
width: { max: 650 },
padding: '14px',
border: {
width: 9,
radius: 9,
color: '#666666'
},
name: 'light'
},
api: {
beforeShow: function () {
// Fade in the modal "blanket" using the defined show speed
$('#qtip-blanket').fadeIn(this.options.show.effect.length);
},
beforeHide: function () {
// Fade out the modal "blanket" using the defined hide speed
$('#qtip-blanket').fadeOut(this.options.hide.effect.length);
}
}
});
// Create the modal backdrop on document load so all modal tooltips can use it
$('<div id="qtip-blanket">')
.css({
position: 'absolute',
top: $(document).scrollTop(), // Use document scrollTop so it's on-screen even if the window is scrolled
left: 0,
height: $(document).height(), // Span the full document height...
width: '100%', // ...and full width
opacity: 0.7, // Make it slightly transparent
backgroundColor: 'black',
zIndex: 5000 // Make sure the zIndex is below 6000 to keep it below tooltips!
})
.appendTo(document.body) // Append to the document body
.hide(); // Hide it initially
$('#printDiv').qtip(
{
展示:{
事件:'单击',//单击时显示
solo:true//并隐藏所有其他工具提示
},
内容:{
预渲染:正确,
标题:{
正文:“核心细节”,
按钮:“关闭”
},
文本:“显示内容”
},
职位:{
目标:$(this).closest($(document.body)),//通过文档正文定位它。。。
角点:“中心”/…位于视口的中心
},
风格:{
宽度:{max:650},
填充:“14px”,
边界:{
宽度:9,
半径:9,
颜色:“#666666”
},
名称:“光”
},
api:{
beforeShow:函数(){
//使用定义的显示速度淡入模式“毯子”
$('#qtip blanket').fadeIn(this.options.show.effect.length);
},
beforeHide:函数(){
//使用定义的隐藏速度淡出模式“毯子”
$('#qtip blanket').fadeOut(this.options.hide.effect.length);
}
}
});
//在文档加载时创建模式背景,以便所有模式工具提示都可以使用它
$('')
.css({
位置:'绝对',
top:$(document).scrollTop(),//使用document scrollTop,这样即使在滚动窗口的情况下,它也会显示在屏幕上
左:0,,
高度:$(document).height(),//跨越整个文档高度。。。
宽度:“100%”、/…和全宽
不透明度:0.7,//使其略微透明
背景颜色:“黑色”,
zIndex:5000//确保zIndex低于6000以使其低于工具提示!
})
.appendTo(document.body)//追加到文档正文
.hide();//先把它藏起来
您从未声明要在qTip 1.0中使用哪个版本的jQuery。然而,考虑到QTIP1.0在两年多前已经过时,可以肯定地说QTIP1.0与您正在使用的任何版本的jQuery都不兼容。。。除非它真的很旧
解决方案:(推荐)或上次与qTip 1.0兼容(不推荐)。您最好发布一些HTML。如果您只使用版本1,请不要在问题上添加标签。。。这引出了另一个好的观点。。。QTIPV1在两年多前QTIP2问世时就已经过时了。。。是时候升级了。