Timeline for Drupal 7 & jQuery -- the $ dollar sign
Current License: CC BY-SA 3.0
6 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Dec 13, 2012 at 10:24 | comment | added | aendra | I'm trying to coin a phrase on the Internet: "Every time you use $(), God kills a kitten." Please -- think of the kittens. | |
Oct 3, 2011 at 6:30 | comment | added | red | You totally ignored what the question asker was "assuming". It's a valid question and a hindurance, especially when embedding 3rd party plugins -- you need to edit all those files to get them to work without $, and you need to do it every update. Find and replace doesn't work with more complex plugins either, since they might require something to be global scope. Needs a fix tbh. | |
Apr 22, 2011 at 21:49 | comment | added | user7 | @maxedison what happens when you mix PHP with JavaScript? Use dollar signs in text strings manipulated by JavaScript? | |
Apr 22, 2011 at 21:34 | comment | added | maxedison | At that point, it wouldn't be difficult to simply do a find and replace to turn all $ into jQuery in my module. | |
Apr 22, 2011 at 21:30 | comment | added | avpaderno♦ |
I agree; for the sake of compatibility is better to not use $ as alias for jQuery, in Drupal, and always wrap JavaScript code using jQuery with (function($){…}) .
|
|
Apr 22, 2011 at 20:38 | history | answered | Berdir | CC BY-SA 3.0 |