Javascript jquery.mobile 1.4.5 未捕获的类型错误:无法读取未定义的属性“concat”

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/38497347/
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 21:32:44  来源:igfitidea点击:

jquery.mobile 1.4.5 Uncaught TypeError: Cannot read property 'concat' of undefined

javascriptjqueryjquery-mobile

提问by mobiledevnewbie

I have created a sample index.html file and included the latest jquery (3.1.0) and jquery mobile (1.4.5).

我创建了一个示例 index.html 文件并包含最新的 jquery (3.1.0) 和 jquery mobile (1.4.5)。

On the loading page the error console outputed:

在加载页面上,错误控制台输出:

jquery.mobile-1.4.5.js:3337 Uncaught TypeError: Cannot read property 'concat' of undefined`

jquery.mobile-1.4.5.js:3337 Uncaught TypeError: 无法读取 undefined` 的属性“concat”

on this line:

在这一行:

mouseEventProps = $.event.props.concat( mouseHookProps ),

When I tried include jquery-1.11.2 there was no issue. Can any one tell me why?

当我尝试包含 jquery-1.11.2 时,没有问题。谁能告诉我为什么?

回答by Manikandan

Look this Documentation

看看这个文档

jQuery mobile is locked to some versions of jQuery! You will find a text of

jQuery mobile 被锁定到某些版本的 jQuery!你会发现一个文本

jQuery Mobile 1.3.0 supports versions of jQuery core 1.7.2 – 1.9.1 and we're actively testing the upcoming 2.0 version too. We will be keeping in sync with their releases to let you take full advantage of the new goodness.

jQuery Mobile 1.3.0 支持 jQuery 核心 1.7.2 – 1.9.1 版本,我们也在积极测试即将推出的 2.0 版本。我们将与他们的发布保持同步,让您充分利用新的优势。

UPDATE

更新

jQuery mobile now works with 2.x versions too, though version 3 still returns the mentioned error.

jQuery mobile 现在也适用于 2.x 版本,但版本 3 仍会返回上述错误。

回答by T.Todua

Use latest version 1.5( It is available at: code.jquery.com):

使用最新版本1.5(可在: code.jquery.com 获得):

http://code.jquery.com/mobile/1.5.0-rc1/jquery.mobile-1.5.0-rc1.min.js