$(document).ready(function () $ is not defined [duplicate]

落爺英雄遲暮 提交于 2019-12-01 07:26:35

问题


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

$(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.


回答1:


This says that, missing jQuery source.

You should add jQuery source between head tags:

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

References must be in head tag following order:

<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>


来源:https://stackoverflow.com/questions/39764516/document-readyfunction-is-not-defined

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!