未捕获的TypeError:$(...).tooltipster不是函数 [英] Uncaught TypeError: $(...).tooltipster is not a function

查看:80
本文介绍了未捕获的TypeError:$(...).tooltipster不是函数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不能将Tooltipster库与tablesorter one一起使用,因为它会引发错误:

I can't use the tooltipster library along with tablesorter one as it throws an error:

未捕获的TypeError:$(...).tooltipster不是函数

Uncaught TypeError: $(...).tooltipster is not a function

还有我的代码:

<html><head>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"> </script>
<script type="text/javascript" src="llibreries/tooltipster/dist/js/tooltipster.bundle.min.js"></script>
<link rel="stylesheet" href="css/jq.css" type="text/css" media="print, projection, screen" />
<link rel="stylesheet" href="themes/blue/style.css" type="text/css" media="print, projection, screen" />
<link rel="stylesheet" href="css/vista.css" type="text/css" />
<link rel="stylesheet" type="text/css" href="llibreries/tooltipster/dist/css/tooltipster.bundle.min.css" />

<script type="text/javascript">
        $(document).ready(function() {
                $('.tooltip').tooltipster({
        contentCloning: false
        });
        });
</script>

<script type="text/javascript" src="llibreries/jquery-latest.js"></script> 
<script type="text/javascript" src="llibreries/jquery.tablesorter.js"></script>
<script type="text/javascript" src="js/docs.js"></script>
<script type="text/javascript" src="addons/pager/jquery.tablesorter.pager.js"></script>

    <script type="text/javascript">
        $(function() 
    {
                $("table")
                .tablesorter({widthFixed: true, widgets: ['zebra']})
                .tablesorterPager({container: $("#pager")
    });
    });
    </script></head> ....

如果我评论第二个脚本$("table").tablesorter ...,则工具提示脚本将起作用.否则,事实并非如此.无法使其正常工作,我在做什么错了?

If I comment the second script $("table").tablesorter... The tooltip script works. Otherwise, it doesn't. Can't make it work, what am I doing it wrong?

推荐答案

请检查标题中嵌入的CDN的链接

Please check the links for the CDN embedded in the header

请检查链接工具提示的CDN .

这是错误的

<script type="text/javascript" src="llibreries/tooltipster/dist/js/tooltipster.bundle.min.js"></script>
<link rel="stylesheet" type="text/css" href="llibreries/tooltipster/dist/css/tooltipster.bundle.min.css" />

尝试一下

<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/tooltipster/3.3.0/js/jquery.tooltipster.js"></script>

<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/tooltipster/3.3.0/css/tooltipster.min.css" />

<html><head>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"> </script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/tooltipster/3.3.0/js/jquery.tooltipster.js"></script>
<link rel="stylesheet" href="css/jq.css" type="text/css" media="print, projection, screen" />
<link rel="stylesheet" href="themes/blue/style.css" type="text/css" media="print, projection, screen" />
<link rel="stylesheet" href="css/vista.css" type="text/css" />
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/tooltipster/3.3.0/css/tooltipster.min.css" />

<script type="text/javascript">
        $(document).ready(function() {
                $('.tooltip').tooltipster({
        contentCloning: false
        });
        });
</script>

<script type="text/javascript" src="llibreries/jquery-latest.js"></script> 
<script type="text/javascript" src="llibreries/jquery.tablesorter.js"></script>
<script type="text/javascript" src="js/docs.js"></script>
<script type="text/javascript" src="addons/pager/jquery.tablesorter.pager.js"></script>

    <script type="text/javascript">
        $(function() 
    {
                $("table")
                .tablesorter({widthFixed: true, widgets: ['zebra']})
                .tablesorterPager({container: $("#pager")
    });
    });
    </script></head>
    <body>
    </body>
    </html>

$(document).ready(function() {
  $('.tooltip').tooltipster({
    contentCloning: false
  });
});

<html><head>
  <script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"> </script>
  <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/tooltipster/3.3.0/js/jquery.tooltipster.js"></script>
  <link rel="stylesheet" href="css/jq.css" type="text/css" media="print, projection, screen" />
  <link rel="stylesheet" href="themes/blue/style.css" type="text/css" media="print, projection, screen" />
  <link rel="stylesheet" href="css/vista.css" type="text/css" />
  <link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/tooltipster/3.3.0/css/tooltipster.min.css" />
  <script type="text/javascript" src="llibreries/jquery-latest.js"></script> 
  <script type="text/javascript" src="llibreries/jquery.tablesorter.js"></script>
  <script type="text/javascript" src="js/docs.js"></script>
  <script type="text/javascript" src="addons/pager/jquery.tablesorter.pager.js"></script>
</head>
    <body>
    </body>
</html>

这篇关于未捕获的TypeError:$(...).tooltipster不是函数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆