简体   繁体   English

当我更改一个jQuery Datepicker的DOM位置时,它不起作用

[英]When I change the a JQuery datepicker's DOM place it does not work

I have a button for showing JQuery datepicker (version: 1.8.20). 我有一个用于显示Jquery datepicker(版本:1.8.20)的按钮。

After running this code: 运行此代码后:

if (scope===document){
  var a=$("input.datepicker");
  $('#header').append(a);
}

This error appear: 出现此错误:

jquery-ui-1.8.20.custom.min.js:65 Uncaught TypeError: Cannot read property 'toLowerCase' of undefined
    at Datepicker._showDatepicker (jquery-ui-1.8.20.custom.min.js:65)
    at jquery-ui-1.8.20.custom.min.js:65
    at Function.each (jquery-1.7.2.min.js:2)
    at init.each (jquery-1.7.2.min.js:2)
    at init.$.fn.datepicker (jquery-ui-1.8.20.custom.min.js:65)
    at showDatePicker (default.js:270)
    at HTMLInputElement.<anonymous> (default.js:249)
    at HTMLInputElement.dispatch (jquery-1.7.2.min.js:3)
    at HTMLInputElement.i (jquery-1.7.2.min.js:3)

Thanks all. 谢谢大家

I upgrade the JQuery Version and the problem solved. 我升级了JQuery版本,问题解决了。

I have to upgrade all the code because of the deprecated methods. 由于不推荐使用的方法,我必须升级所有代码。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM