首先加载页面时,工具提示就可以了,但是对于其他每个回发都会抛出错误(“.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);
}
}
工具提示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>