Menu

jQuery Fundamentals :: A guide to the basics of jQueryjQuery released almost eight years, quite unbelievable. Web development over the years has changed a lot, jQuery also changes significantly. In this process, the team has been working on efforts to ensure compatible between supports and get the best Web development practices with the reality of the past code.

One of the best practice is semantic version, or simply call it semver . In practice, semver gave developers (and builder) One way to avoid a risk of switching software version. Version number MAJOR.MINOR.PATCH form, its three parts are integers. In semver, if MAJOR changed, which means that there are developers the API changes need to pay attention to the fault changes.

JQuery in version control concept becomes more subtle, because jQuery for browser compatibility is more important than API compatibility. In order to create a thin jQuery, the team in 2013 released two versions. Holding the first version 1.x number, current 1.11.1, this holds the maximum number of browser compatible. The second version, from 2.0.0 to 2.1.1 now, to streamline the code removes support for IE8 and the following browsers. Whether it is the jQuery 1.x and 2.x versions have the same public API, but their internal implementation is different.

Our next version will use different naming conventions. As before, there will be two different publishing documents. 1.11.1 Inheritance version will become jQuery Compat 3.0. Inheritance version jQuery 2.1.1 will be jQuery 3.0. On npm and Bower have two different packages, but they share the same version through to indicate that they have the same API.

We will publish as these policies to readjust our browser support. The main package will still maintain a small compact to support jQuery publish regular browser (current and previous versions of the browser-specific) when it is published. Based on market share, we may support additional browsers in this package. JQuery-compatible package provides a wider browser support, but the file size will be larger and there will be a potential risk of low performance.

In addition to the large version number jump, we will not do much to change the current jQuery code. We want to handle version changes. Some changes, such as deleting outdated methods will be a new version of jQuery plugin migration is detected; it is easier to find and fix them. We will list more details in the future to modify the blog.

Here are some of the jQuery API 3.0 versions of the content to say:

If you want compatible with a wider range of browsers, including IE8, Opera 12, Safari 5 and so on, using jQuery-Compat 3.0.0 package. Most sites we recommend using this version, because it provides the best compatibility for the most site visitors.
If your site is designed to build the leading browser, or a webview (such as PhoneGap or Cordova) container HTML applications, and you know what browser engine will use it, then use jQuery 3.0.0 package.
Unless we announce otherwise, in the same major and minor versions of these two packages will contain similar public API. So that developers can easily switch between them, and will remain with third party jQuery plugin for maximum compatibility.

When they released their own future, we will ensure that both of these two packages in npm and bower in. These two packages are also available as a separate file will still exist in jQuery CDN. From there, they are very simple to use, depending on your need to include jquery-compat-3.0.0.js or jquery-3.0.0.js. We talked about the conversation with the operation and maintenance Google CDN people, they will support both packages.

We further development of version 3.0, we will update the code changes, and the details are browser supports and so Stay tuned!
 
Top