Jquery工具提示问题(flowplayer toolitp)
当页面首先加载时,工具提示正常,但对于每个其他回发,它都会抛出错误 (".download_now").tooltip({effect: 'slide',delay:300).dynamic 不是函数。
asp.net ajax 没有问题,因为 updatepanel 回发总是如此。
这是 js:
Sys.WebForms.PageRequestManager.getInstance().add_endRequest(MainEndRequestHandler);
$(MainEndRequestHandler);
function MainEndRequestHandler(sender, args) {
loadeverthingmaster();
}
function loadeverthingmaster(){
try
{
$(".download_now").tooltip({
effect: 'slide',
delay:300
}).dynamic({ bottom: { direction: 'down', bounce: true } });
$(".help-bubble-link[title]").tooltip({
// tweak the position
offset: [10, 2],
// use the "slide" effect
effect: 'slide',
// add dynamic plugin with optional configuration for bottom edge
}).dynamic({ bottom: { direction: 'down', bounce: true } });
}
catch(err)
{
//alert(err);
}
}
Tooltip html :
<a class="download_now">?</a>
<div class="tooltip" style="visibility: visible; position: absolute; top: -6px; left: 170.5px; display: none; opacity: 0;">
<div style="display:block;" id="divTooltipLabelAreaf49db1de-11ce-4667-bd7d-f655dec1435c">
<span id="spanEditf49db1de-11ce-4667-bd7d-f655dec1435c" class="tooltip-message-span no-content">
No notes
</span>
<br>
<a onclick="StartEditTooltip('f49db1de-11ce-4667-bd7d-f655dec1435c')" href="#">Edit</a>
</div>
<div style="display:none;" id="divEditAreaf49db1de-11ce-4667-bd7d-f655dec1435c">
<textarea id="inputTextf49db1de-11ce-4667-bd7d-f655dec1435c">
</textarea>
<br>
<a onclick="CancelEditTooltip('f49db1de-11ce-4667-bd7d-f655dec1435c')" href="#">Cancel</a>
<a onclick="SaveEditTooltip('f49db1de-11ce-4667-bd7d-f655dec1435c','/Query/Ascx/QueryAutoCompleteService.asmx/SaveQueryNotes','51')" href="#">Save</a>
</div>
</div>
When page is loaded first, tooltip comes fine but for every other postback it throws error that (".download_now").tooltip({effect: 'slide',delay:300).dynamic is not a function.
There is no issue with asp.net ajax since updatepanel postback is always.
Here is the js:
Sys.WebForms.PageRequestManager.getInstance().add_endRequest(MainEndRequestHandler);
$(MainEndRequestHandler);
function MainEndRequestHandler(sender, args) {
loadeverthingmaster();
}
function loadeverthingmaster(){
try
{
$(".download_now").tooltip({
effect: 'slide',
delay:300
}).dynamic({ bottom: { direction: 'down', bounce: true } });
$(".help-bubble-link[title]").tooltip({
// tweak the position
offset: [10, 2],
// use the "slide" effect
effect: 'slide',
// add dynamic plugin with optional configuration for bottom edge
}).dynamic({ bottom: { direction: 'down', bounce: true } });
}
catch(err)
{
//alert(err);
}
}
Tooltip html :
<a class="download_now">?</a>
<div class="tooltip" style="visibility: visible; position: absolute; top: -6px; left: 170.5px; display: none; opacity: 0;">
<div style="display:block;" id="divTooltipLabelAreaf49db1de-11ce-4667-bd7d-f655dec1435c">
<span id="spanEditf49db1de-11ce-4667-bd7d-f655dec1435c" class="tooltip-message-span no-content">
No notes
</span>
<br>
<a onclick="StartEditTooltip('f49db1de-11ce-4667-bd7d-f655dec1435c')" href="#">Edit</a>
</div>
<div style="display:none;" id="divEditAreaf49db1de-11ce-4667-bd7d-f655dec1435c">
<textarea id="inputTextf49db1de-11ce-4667-bd7d-f655dec1435c">
</textarea>
<br>
<a onclick="CancelEditTooltip('f49db1de-11ce-4667-bd7d-f655dec1435c')" href="#">Cancel</a>
<a onclick="SaveEditTooltip('f49db1de-11ce-4667-bd7d-f655dec1435c','/Query/Ascx/QueryAutoCompleteService.asmx/SaveQueryNotes','51')" href="#">Save</a>
</div>
</div>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论