What jQuery version to mention in code

Solution 1:

It depends from your target audience, and therefore from the browsers you need to support. You have three options:

  1. If you need to support older browsers like Internet Explorer 6-8, Opera 12.1x or Safari 5.1+, use: jQuery 1.11.3 + jQuery Mobile 1.4.5
  2. If you need the current stable and most used pair, use: jQuery 2.1.4 + jQuery Mobile 1.4.5
  3. If you are living on the edge, and would like to actively take part to the jQuery Mobile development, notify bugs and open issues on github, use: jQuery 3.2.1 + jQuery Mobile 1.5.0-alpha.1

Solution 2:

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.