Jquery ui 查找.dynamic函数时回发Jquery thorws错误
我正在使用jquery显示工具提示弹出窗口,下面是我正在使用的代码Jquery ui 查找.dynamic函数时回发Jquery thorws错误,jquery-ui,jquery-plugins,jquery,jquery-selectors,jquery-tooltip,Jquery Ui,Jquery Plugins,Jquery,Jquery Selectors,Jquery Tooltip,我正在使用jquery显示工具提示弹出窗口,下面是我正在使用的代码 <script type="text/javascript"> Sys.WebForms.PageRequestManager.getInstance().add_endRequest(MainEndRequestHandler); $(MainEndRequestHandler); function MainEndRequestHandl
<script type="text/javascript">
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);
}
}
</script>
但是当我加载我的页面时,我得到了这个错误
TypeError:$。立即下载。工具提示{效果:幻灯片,延迟:300}。动态不是一个函数
我不知道为什么会这样。有人有什么想法或解决办法吗
请检查您导入脚本的顺序。确保此脚本标记位于jquery工具提示插件导入的下方。还要确保jquery和jquery ui在jquery工具提示插件上方导入。此外,您可能希望尝试使用document.ready包装此代码,以确保加载所有脚本,如下所示:
<script type="text/javascript">
$(document).ready(function(){
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);
}
}
});
</script>
这是一个格式不好的问题。。你没有告诉我们你正在使用什么插件,所以很难给你一个直接的答案。您是否尝试注释$的代码。请立即下载\u。。。并查看您的$.help气泡链接[标题]。。。按预期运行?我认为你需要为第一个工具提示效果提供一个字符串或标题,因为我不认为该插件设计用于DOM元素。当页面加载时,他使用这个库w/jquery works第一次找到的所有东西,但在任何回发后都不起作用。。。
<!-- jQuery Library + ALL jQuery Tools -->
<script src="http://cdn.jquerytools.org/1.2.5/full/jquery.tools.min.js"></script>
$(".help-bubble-link['title']").tooltip({ //notice change in this line
// 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 } });