1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-30 05:20:56 +02:00

[ticket/10271] Added comments to AJAX callbacks.

PHPBB3-10271
This commit is contained in:
Callum Macrae
2011-10-22 16:16:15 +01:00
committed by Igor Wiedler
parent 7f33897154
commit 1c5b1ede1c
3 changed files with 48 additions and 8 deletions

View File

@@ -353,6 +353,11 @@ phpbb.add_ajax_callback = function(id, callback)
}
/**
* This callback alternates text - it replaces the current text with the text in
* the alt-text data attribute, and replaces the text in the attribute with the
* current text so that the process can be repeated.
*/
phpbb.add_ajax_callback('alt_text', function(el) {
var alt_text = $(el).data('alt-text');
$(el).data('alt-text', $(el).text());