jQuery UI quot; $(quot;#datepickerquot;).datepicker is not a functionquot;(jQuery 用户界面$(“#datepicker).datepicker 不是函数)
问题描述
当我在现有的 .aspx 页面中使用 jQuery 的 UI 插件 DatePicker 时,我收到以下错误:
When i use DatePicker, jQuery's UI plugin, in an existing .aspx page I get errors that:
$("#datepicker").datepicker is not a function
但是,当我将创建和使用 datePicker 的相同代码复制并粘贴到与 aspx 页面位于同一目录中的 HTML 文件中时,它可以完美运行.这让我假设 aspx 页面中有一些 JS 文件阻止 datePicker 或 jQuery 的 UI JS 文件正确加载.
However, when I copy and paste the same code that creates and uses the datePicker to an HTML file that's also in the same directory as the aspx page, it works flawlessly. This leads me to assume that there are some JS files in the aspx page that's preventing the datePicker or maybe jQuery's UI JS files to load properly.
谁能证实我的看法或提供任何提示来找出干扰 jQuery 的 UI 插件的罪魁祸首?
Can anyone confirm my beliefs or provide any tips on finding the culprit that's interfering with jQuery's UI plugins?
推荐答案
我为类似的问题苦苦挣扎了好几个小时.后来发现,jQuery 被包含了两次,一次是我添加 jQuery 函数的程序,一次是我们的内部调试器.
I struggled with a similar problem for hours. It then turned out that jQuery was included twice, once by the program that I was adding a jQuery function to and once by our in-house debugger.
这篇关于jQuery 用户界面$(“#datepicker").datepicker 不是函数"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:jQuery 用户界面$(“#datepicker").datepicker 不是函数"
- 良好实践:如何重用 .csproj 和 .sln 文件来为 CI 创建 2022-01-01
- 在哪里可以找到使用中的C#/XML文档注释的好例子? 2022-01-01
- C#MongoDB使用Builders查找派生对象 2022-09-04
- 如何用自己压缩一个 IEnumerable 2022-01-01
- WebMatrix WebSecurity PasswordSalt 2022-01-01
- C# 中多线程网络服务器的模式 2022-01-01
- 输入按键事件处理程序 2022-01-01
- Web Api 中的 Swagger .netcore 3.1,使用 swagger UI 设置日期时间格式 2022-01-01
- 带有服务/守护程序应用程序的 Microsoft Graph CSharp SDK 和 OneDrive for Business - 配额方面返回 null 2022-01-01
- MoreLinq maxBy vs LINQ max + where 2022-01-01
