Skip to main content
Drupal is a registered trademark of Dries Buytaert
Release: OpenID Connect / OAuth client 3.0.0-alpha9 New alpha version released for module openid_connect (3.0.0-alpha9). Release: Opensolr Search 4.5.0 Minor update available for module opensolr_search (4.5.0). Release: Timelinr 1.0.1 Minor update available for module timelinr (1.0.1). Usage Milestone: Simplify Module simplify crossed 10,000 active installs. Usage Milestone: Views Reference Filter Module entityreference_filter crossed 10,000 active installs. Usage Milestone: Dropdown Language Module dropdown_language crossed 10,000 active installs. Usage Milestone: Paragraphs Browser Module paragraphs_browser crossed 10,000 active installs. Usage Milestone: OpenAPI Module openapi crossed 10,000 active installs. Usage Milestone: Decoupled Router Module decoupled_router crossed 10,000 active installs. Module Revived: Entityqueue Buttons 1.1.2 Module entityqueue_buttons updated after 8 months of inactivity (1.1.2).

jQuery Dollar

481 sites Security covered Drupal 9–11
View on drupal.org

This module allows developers to use the "$" symbol to access the jQuery library directly in the global namespace. It's a convenience for those who find the default Drupal method of accessing jQuery cumbersome.

What?

This module allows developers to use $ to access the jQuery library in the global namespace instead of calling jQuery explicitly or passing $ as a parameter into your closures.

Why?

Originally, I was annoyed about the change in Drupal 7 (http://drupal.org/node/1407256) that caused Drupal to noconflict() jQuery by default. This was a code migration headache and an inconvenience when it came to using most snippets of jQuery found in example documentation or in snippets on the web.

Now, as I have come to better understand javascript architecture, the value in noconflicting jQuery seems clear, and the only genuine purpose I can give to this module is as a convenience to those who are still annoyed by the minor hoops required to use jQuery "normally".

Should I?

You're OK to use this module if:
1. You don't expect to use any other javascript library that uses the global $ (Prototype, MooTools, maybe some others).
2. You don't need to use different versions of jQuery per page or multiple versions of jQuery throughout your site.

In general this module goes against the now fairly established javascript conventions in Drupal. If those conventions annoy you and you prefer easier access to the $, more power to you. I've been there.

How?

How does it work? The module implements hook_js_alter and injects a js file that re-assigns the global $ to point to jQuery. This happens immediately after misc/drupal.js (drupal.init.js in D8) is loaded (which is where jQuery.noConflict is called) so any other javascript in the site can utilize it, even other scripts that gets added in hook_js_alter should be fine.

Special thanks to sun for collaboration and lending expertise.

Depends on

Dependencies of the latest stable release

No dependencies recorded for this project.

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
1
Tracked since
Nov 2025
Latest release
9 months ago
Releases (12 mo)
1 ▲ from 0
Maintenance
Slowing

Releases

Version Type Core Release date
2.0.1 Stable 9–11 Nov 1, 2025