diff options
author | Angie Byron <webchick@24967.no-reply.drupal.org> | 2010-11-29 03:00:50 +0000 |
---|---|---|
committer | Angie Byron <webchick@24967.no-reply.drupal.org> | 2010-11-29 03:00:50 +0000 |
commit | 4e90d24dd9ff1474bf679f70a351dee371e87b51 (patch) | |
tree | 29a273840a1c145fcd5e43ca39a7c04504842a7e /misc | |
parent | ff119bc0ccfa224279456c901904955a6b1f4d05 (diff) | |
download | drupal-4e90d24dd9ff1474bf679f70a351dee371e87b51.tar.gz drupal-4e90d24dd9ff1474bf679f70a351dee371e87b51.zip |
#818660 by yched, sun: Provide an AJAX command to invoke simple jQuery methods.
Diffstat (limited to 'misc')
-rw-r--r-- | misc/ajax.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/misc/ajax.js b/misc/ajax.js index 127dd07ae95..088d46df723 100644 --- a/misc/ajax.js +++ b/misc/ajax.js @@ -544,6 +544,14 @@ Drupal.ajax.prototype.commands = { }, /** + * Command to apply a jQuery method. + */ + invoke: function (ajax, response, status) { + var $element = $(response.selector); + $element[response.method].apply($element, response.arguments); + }, + + /** * Command to restripe a table. */ restripe: function (ajax, response, status) { |