jQuery in Drupal

With new javascript frameworks like React and Vue, what is the state of jQuery in Drupal?

jQuery is still commonly used in most Drupal sites that are not decoupled. jQuery UI is used in many parts of the system for browser compatibility and accessibility. There is some work going on to update it to something more modern.

UI Dialog

A modal/dialog popup can be created by adding the "use-ajax" class to a link, plus dialog parameters. https://www.drupal.org/node/3031444

This dialog uses jQuery UI Dialog, and is used in many places in the admin interface.

You can implement a different library on the front end using different techniques, but this is still the "native" dialog widget in use.

This issue tracks the progress on replacing it: View on Drupal.org #2158943 Add a native dialog element using HTMX to deprecate the jQuery UI dialog Status: Needs review

Once

jQuery Once is a plugin written by the Drupal community to load scripts once, even if the page is updated with ajax. It was replaced with a library called once.

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

Other issues

[meta] Replace JQuery with vanilla Javascript in core
View on Drupal.org #3052002 [meta] Replace JQuery with vanilla Javascript in core Status: Active

[Plan] Remove jQuery UI components used by Drupal core and replace with a set of supported solutions
View on Drupal.org #3067261 [Plan] Remove jQuery UI components used by Drupal core and replace with a set of supported solutions Status: Closed (fixed)

Proposal to use Vue.js for building Drupal’s administrative UIs
View on GitLab #2913628 Proposal to use Vue.js for building Drupal’s administrative UIs Status: Closed

Re-evaluate use of Backbone.js in core
View on Drupal.org #3145958 [META] Re-evaluate use of Backbone.js in core Status: Closed (fixed)

Search for javascript modernization initiative issues
https://www.drupal.org/project/issues/search?issue_tags=Javascript%20Modernization%20Initiative

Replacing(?) jQuery UI resizable
View on Drupal.org #3201835 Replacing(?) jQuery UI resizable Status: Needs work

Tags