1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-04 07:47:34 +02:00

[ticket/10271] Reduced calls to $ in the AJAX JavaScript.

PHPBB3-10271
This commit is contained in:
Callum Macrae
2011-10-22 16:31:52 +01:00
committed by Igor Wiedler
parent 1c5b1ede1c
commit 95659ba92c
3 changed files with 27 additions and 20 deletions

View File

@@ -359,9 +359,10 @@ phpbb.add_ajax_callback = function(id, callback)
* 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());
$(el).text(el.title = alt_text);
el = $(el);
var alt_text = el.data('alt-text');
el.data('alt-text', el.text());
el.text(el[0].title = alt_text);
});