jQuery库不能同时工作

时间:2019-04-28 14:25:30

标签: jquery jquery-ui bootstrap-4

我正在尝试为我的MVC应用程序中的搜索字段创建自动完成方法。

它使用Jquery-UI,并且每当我将其链接到视图时,其他不使用Jquery-UI的脚本就会停止工作,并且出现诸如“ .modal”和“ .datepicker”之类的错误,这不是一种方法

当我注释掉Jquery-UI时,日期选择器和模式可以正常工作。 添加库的顺序我做错了吗?我曾尝试将其中一些按不同顺序向上移动,但似乎没有任何作用。

<link href="~/Content/bootstrap.min.css" rel="stylesheet" type="text/css" />
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
    <link href="@Url.Content("~/Content/Css/profiel_info.less")" rel="stylesheet" type="text/css" />

    <script src="~/Scripts/modernizr-2.6.2.js"></script>
    <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
    <script src="~/Scripts/jquery.validate.min.js"></script>
    <script src="~/Scripts/jquery.validate.unobtrusive.min.js"></script>
    <script src="~/Scripts/jquery.unobtrusive-ajax.min.js"></script>
    <script src="~/Scripts/Views/common.js"></script>
    <script src="~/Scripts/bootstrap.min.js"></script>


    <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.22.2/moment.min.js"></script>
        <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/tempusdominus-bootstrap-4/5.0.1/js/tempusdominus-bootstrap-4.min.js"></script>
        <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/tempusdominus-bootstrap-4/5.0.1/css/tempusdominus-bootstrap-4.min.css" />

    <link rel="stylesheet" href="//code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css">
        <script src="//code.jquery.com/ui/1.11.4/jquery-ui.js"></script>
        <link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css">

0 个答案:

没有答案