diff options
author | Angie Byron <webchick@24967.no-reply.drupal.org> | 2009-02-18 13:46:55 +0000 |
---|---|---|
committer | Angie Byron <webchick@24967.no-reply.drupal.org> | 2009-02-18 13:46:55 +0000 |
commit | ac484c277a0ac0627561d2cac1f4ea47ab5da00b (patch) | |
tree | eac82650ab4c17d3f62461127403e2aff344cd82 /misc/farbtastic | |
parent | b6025a8820ffc84fccbde3a8f77ba6f9c183bfc4 (diff) | |
download | brdo-ac484c277a0ac0627561d2cac1f4ea47ab5da00b.tar.gz brdo-ac484c277a0ac0627561d2cac1f4ea47ab5da00b.tar.bz2 |
#125030 by kkaefer, quicksketch, dvessel, Steven, and John Resig: Allow compatibility with other JavaScript libraries.
Diffstat (limited to 'misc/farbtastic')
-rw-r--r-- | misc/farbtastic/farbtastic.js | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/misc/farbtastic/farbtastic.js b/misc/farbtastic/farbtastic.js index 028b00b36..18b083eab 100644 --- a/misc/farbtastic/farbtastic.js +++ b/misc/farbtastic/farbtastic.js @@ -1,17 +1,18 @@ // $Id$ // Farbtastic 1.2 +(function($) { -jQuery.fn.farbtastic = function (callback) { +$.farbtastic = function (callback) { $.farbtastic(this, callback); return this; }; -jQuery.farbtastic = function (container, callback) { +$.farbtastic = function (container, callback) { var container = $(container).get(0); - return container.farbtastic || (container.farbtastic = new jQuery._farbtastic(container, callback)); + return container.farbtastic || (container.farbtastic = new $._farbtastic(container, callback)); }; -jQuery._farbtastic = function (container, callback) { +$._farbtastic = function (container, callback) { // Store farbtastic object var fb = this; @@ -266,4 +267,6 @@ jQuery._farbtastic = function (container, callback) { if (callback) { fb.linkTo(callback); } -};
\ No newline at end of file +}; + +})(jQuery); |