6

How can I find out what version of jQuery a particular release of Drupal 8 core is using?

  • I've made a small change to the question so it's less of a moving target for the future, I'm pretty sure your original intent is covered by the new version. Any problems just edit or let me know – Clive Apr 26 '16 at 17:33
  • @Clive: Why not remove the "8" from the title, question and tags also? Same question applies for any release of Drupal, no? – Pierre.Vriens Apr 26 '16 at 17:38
  • @Pierre ... no it doesn't. I'm asking what version of jQuery is for Drupal 8. I don't want to know what is Drupal 7 or anything else. It's a very simple basic question that someone can answer in less than 10 seconds vs me looking it up which can take 10-30 minutes. I didn't a quick search and I was not able to find it on google, which is why I asked here. – Patoshi パトシ Apr 26 '16 at 18:31
8

If you want to save some time, you can go to the Javascript console and type jQuery.fn.jquery which works on any site using jQuery, not only Drupal sites.

At the moment Drupal 8 core uses jQuery 2.1.4, but it looks like jQuery 3 has been implemented in Drupal 8.4.x.

https://www.drupal.org/node/2533498

8

This is probably not the best question because the answer could change over time based on the specific version of Drupal.

The most accurate way to find what version of a JavaScript library is used by Drupal core is to look directly at the core/core.libraries.yml file for a given version of Drupal. One of the easiest ways to do this is to browse Drupal's git repository online:

http://cgit.drupalcode.org/drupal/tree/core/core.libraries.yml#n334

jquery:
  remote: https://github.com/jquery/jquery
  version: VERSION_HERE
  license:
    name: MIT
    url: https://github.com/jquery/jquery/blob/VERSION_HERE/MIT-LICENSE.txt
    gpl-compatible: true
  js:
    assets/vendor/jquery/jquery.min.js: { minified: true, weight: -20 }

For Drupal 6-7, without jquery_update module installed, the version of Drupal can be most easily discovered by going into the misc/ directory, and looking at the top of the jquery.js file. This is v1.2.6 and v1.4.4 respectively.

For Drupal 5, the version of jquery is not readily apparent, but the handy git blame misc/jquery.js reveals the commit 0d57bae updated jQuery to v1.0.4.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.