jQuery UI的" $("#日期选择器")日期选择器不是一个函数&QUOT。 [英] jQuery UI " $("#datepicker").datepicker is not a function"

查看:167
本文介绍了jQuery UI的" $("#日期选择器")日期选择器不是一个函数&QUOT。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我使用的DatePicker,jQuery的UI插件,在现有的.aspx页面中,我得到的错误,

When i use DatePicker, jQuery's UI plugin, in an existing .aspx page I get errors that:

$("#datepicker").datepicker is not a function

然而,当我复制和粘贴相同的code,创建并使用日期选择器的HTML文件,该文件也是在同一目录aspx页面,它完美的作品。这使我假设有在aspx页面这是preventing的日期选择器或者jQuery的UI JS文件正确加载一些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 UI的" $("#日期选择器")日期选择器不是一个函数&QUOT。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆