Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
203 views
in Technique[技术] by (71.8m points)

What jQuery version to mention in code

I'm using jQuery, and I'm little confused about what version is included at start of my page. From my experience with other software I understand that each new version contains most old features, and offers some new ones. If latests jQuery version is 1.9 for example, why would I mention this:

<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="../jqm145/jquery.mobile-1.4.5.min.css">
<script src="../jq1-11-3/jquery-1.11.3.js"></script>
<script src="../jqm145/jquery.mobile-1.4.5.min.js"></script>

How do I check if a function will work in a specific version of Jquery?

Furthermore, the mobile JQuery version 1.4.5 and "plain" JQuery is 1.11.3. Why is this the case?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

jQuery mobile (perhaps confusingly) is not a mobile version of jQuery, it's a library based on jQuery that contains controls, logic, etc. for Mobile devices.

jQuery has remained backwards compatible until version 3.0.0, in which support for older browsers has been dropped.

As a rule of thumb, it's good to update both libraries at the same time if one depends upon the other.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...