JQuery 版本不兼容

问题描述 投票:0回答:0

我需要这 3 个 jquery 库:

https://code.jquery.com/jquery-1.12.4.js

https://code.jquery.com/ui/1.12.1/jquery-ui.js

https://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.js

直到今天,我都没有问题,一切都运行良好。但是现在我可以看到一些问题:

  1. 第一个问题。在网站底部,您会看到文字:“正在加载”。当我检查元素时,我看到下一个:

<div class="ui-loader ui-corner-all ui-body-a ui-loader-default" style="top: 485.5px;"><span class="ui-icon-loading"></span><h1>loading</h1></div>

(此代码不是我的)

  1. 但是,我的网站现在最大的问题是链接,因为现在不起作用

例如:

Main html : test2.html
Call a new html: test3.html

test2.html -> test3.html

代码如下:

test2.html

<!DOCTYPE html>
<html lang="en">
<head>
<!-- 1) JQuery -->
<script src="https://code.jquery.com/jquery-1.12.4.js"></script>
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
<script src="https://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.js"></script>
</head>
<body>
<a href="./test3.html">New Page</a>
</body>
</html>

test3.html

<!DOCTYPE html>
<html lang="en">
<body>
<h1>New Page</h1>
</body>
</html>

如果生成这两个 html 文件,并执行“test2.html”,您将在 test2.html 的底部看到文本“loading”。而这个文本没有出现在 test2.html

而且,如果您单击“新页面”链接,该链接将无法正常工作。奇怪的是,如果您选择“在新窗口中打开”链接“新页面”(test2.html),test3.html 的内容将正确显示在新窗口中。

我不知道这 3 个 jquery 库之间是否存在不兼容性。有可能我需要使用其他版本吗?

拜托,我不知道还能测试什么。我会感谢你的帮助!

问候

jquery
© www.soinside.com 2019 - 2024. All rights reserved.