为什么可以';我不能使用插件和jquery UI吗?

为什么可以';我不能使用插件和jquery UI吗?,jquery,Jquery,我启动了一个包含颜色框插件的网页。但是,当我添加ui元素(选项卡)时,我的插件似乎不会停止工作。返回错误$(…)。制表符不是函数。只有当我试图使这两个都工作时,才会出现此错误。当我删除标签的代码时,插件工作正常。有什么想法吗 <link href="https://code.jquery.com/ui/1.10.4/themes/ui-lightness/jquery-ui.css" rel="stylesheet"> <script src="https://code.jqu

我启动了一个包含颜色框插件的网页。但是,当我添加ui元素(选项卡)时,我的插件似乎不会停止工作。返回错误$(…)。制表符不是函数。只有当我试图使这两个都工作时,才会出现此错误。当我删除标签的代码时,插件工作正常。有什么想法吗

<link href="https://code.jquery.com/ui/1.10.4/themes/ui-lightness/jquery-ui.css" rel="stylesheet">
<script src="https://code.jquery.com/jquery-1.10.2.js"></script>
<script src="https://code.jquery.com/ui/1.10.4/jquery-ui.js"></script>
<link rel="stylesheet" type="text/css" href="proppagesstyle.css">
<link rel="stylesheet" href="colorbox\colorbox-master\colorbox.css" />
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script src="colorbox\colorbox-master\jquery.colorbox.js"></script>


<div id="tabs-1">
    <ul>
        <li><a href="#tabs-2">Description</a></li>
        <li><a href="#tabs-3">Floor Plan</a></li>
        <li><a href="#tabs-4">Map</a></li>
    </ul>
    <div id="tabs-2">
        <p>
            Description
        </p>
    </div>
    <div id="tabs-3">
        <p>
            <img src="prop1Plan.jpg">
        </p>
    </div>
    <div id="tabs-4">
        <p>
            <iframe src="https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d39851.09199225635!2d0.061092186988258655!3d51.371935680859664!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x47d8ab091574bbd7%3A0x12eb74ad89922e5b!2sOrpington!5e0!3m2!1sen!2suk!4v1482163876019" width="600" height="450" frameborder="0" style="border:0" allowfullscreen></iframe>
        </p>
    </div>
</div>

<script>
    $(document).ready(function () {
        $(".group1").colorbox({ rel: 'gallery' });
    });
    $("#click").click(function () {
        $('#click').css({ "background-color": "#f00", "color": "#fff", "cursor": "inherit" }).text("Open this window again and this message will still be here.");
        return false;
    });

    $(function () {
        "use strict";
        $("#tabs-1").tabs();
    });
</script>

描述

$(文档).ready(函数(){ $(“.group1”).colorbox({rel:'gallery'}); }); $(“#单击”)。单击(函数(){ $('#click').css({“背景色”:“#f00”,“颜色”:“#fff”,“光标”:“继承”}); 返回false; }); $(函数(){ “严格使用”; $(“#tabs-1”).tabs(); });
问题在于您在第一个版本之后添加了第二个版本的jQuery。这将覆盖以前应用了jQueryUI方法的
jQuery
实例

要解决此问题,只需删除对jQuery
1.10.2
的第二个引用。一个页面中只能包含一个版本的jQuery

<link href="https://code.jquery.com/ui/1.10.4/themes/ui-lightness/jquery-ui.css" rel="stylesheet">
<link rel="stylesheet" href="colorbox\colorbox-master\colorbox.css" />
<link rel="stylesheet" type="text/css" href="proppagesstyle.css">

<script src = "https://code.jquery.com/jquery-1.10.2.js"></script>
<script src = "https://code.jquery.com/ui/1.10.4/jquery-ui.js"></script>
<script src="colorbox\colorbox-master\jquery.colorbox.js"></script>


您应该检查代码的格式是否正确-这将使阅读和理解代码更加容易。谢谢,这很有意义。