Closed (fixed)
Project:
Drupal core
Version:
7.2
Component:
javascript
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
21 Aug 2011 at 09:10 UTC
Updated:
8 Jul 2012 at 16:11 UTC
In Drupal 7 it's required to wrap my jquery codes in
(function ($) {
// Original JavaScript code.
})(jQuery);
But it makes all the variables local and I cant access them from another file. How can pass the variables around as if they are global?
Comments
Comment #1
nod_You can add things in the Drupal object but that's pretty dirty.
The typical way of doing that is using events to pass things around.