【问题标题】:Error on tagit plugin usage: "TypeError: $(...).tagit is not a function"tagit 插件使用错误:“TypeError: $(...).tagit is not a function”
【发布时间】:2016-05-13 13:56:03
【问题描述】:

在html中使用时:

 <script type="text/javascript">
    $(document).ready(function() {
        $("#question-meta").tagit({
            fieldName: "meta"
        });
    });
    </script>
<ul id="question-meta"></ul>

我按照说明使用它: https://github.com/aehlke/tag-it (所有 js/css 文件都包含在内)

有什么建议吗?

【问题讨论】:

  • 嗨!欢迎来到堆栈溢出。当提出这样的问题时,获得答案的一个好方法是发布你到目前为止所拥有的任何东西。这样就更容易理解问题并提出建议。

标签: javascript jquery plugins tag-it


【解决方案1】:

在 head 标签中包含这个库:

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.2/jquery.min.js"></script>
<script src="https://rawgit.com/aehlke/tag-it/master/js/tag-it.js"></script>
<link rel="stylesheet" type="text/css" href="http://aehlke.github.io/tag-it/css/jquery.tagit.css">

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2015-11-01
    • 2021-08-20
    • 2019-07-20
    • 2021-08-01
    • 2018-10-28
    • 2018-07-17
    • 2015-10-11
    相关资源
    最近更新 更多