Javascript $(document).ready(function () $ 未定义

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/39764516/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-23 22:52:54  来源:igfitidea点击:

$(document).ready(function () $ is not defined

javascriptjqueryasp.net-mvckendo-gridkendo-asp.net-mvc

提问by Hassan Abbas

I'm working on asp.net mvc and using Kendo UI grid control for data retrieving, using these functionality for another application working fine problem not in code. All JavaScript and Kendo grid ui reference including when i run the application i face these error

我正在研究 asp.net mvc 并使用 Kendo UI 网格控件进行数据检索,将这些功能用于另一个应用程序工作正常的问题,而不是代码中。所有 JavaScript 和 Kendo 网格 ui 参考,包括当我运行应用程序时遇到这些错误

$(document).ready(function () $ is not defined List:178 Uncaught TypeError: $(...).kendoDatePicker is not a function

$(document).ready(function () $ is not defined List:178 Uncaught TypeError: $(...).kendoDatePicker is not a function

multiple time. when i click on error they show me error on this lines

多次。当我点击错误时,他们会在这条线上显示错误

<script>
$(document).ready(function () {
    $("#StartDate").kendoDatePicker();
});

I add assembly on reference but noting fruitful.

我在参考中添加了程序集,但注意到富有成效。

回答by praguan

This says that, missing jQuery source.

这就是说,缺少 jQuery 源代码。

You should add jQuery source between head tags:

您应该在 head 标签之间添加 jQuery 源代码:

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js">

References must be in head tag following order:

引用必须按以下顺序在 head 标签中:

<head>
    <title></title>
    <link rel="stylesheet" href="styles/kendo.common.min.css" />
    <link rel="stylesheet" href="styles/kendo.default.min.css" />
    <link rel="stylesheet" href="styles/kendo.default.mobile.min.css" />

    <script src="js/jquery.min.js"></script>
    <script src="js/kendo.all.min.js"></script>
</head>