diff options
author | Joas Schilling <nickvergessen@gmx.de> | 2012-04-18 17:01:40 +0200 |
---|---|---|
committer | Joas Schilling <nickvergessen@gmx.de> | 2012-04-19 13:37:07 +0200 |
commit | 286aebd93bd49eac2ff80c3a6930f7f692a4c3ef (patch) | |
tree | ebfdd19cc6a43097850ceb36e973e2cdbd2c1dc0 /phpBB/assets | |
parent | de7a166a5990a3b59ffff145f7acb7b9e1dcb3c5 (diff) | |
download | forums-286aebd93bd49eac2ff80c3a6930f7f692a4c3ef.tar forums-286aebd93bd49eac2ff80c3a6930f7f692a4c3ef.tar.gz forums-286aebd93bd49eac2ff80c3a6930f7f692a4c3ef.tar.bz2 forums-286aebd93bd49eac2ff80c3a6930f7f692a4c3ef.tar.xz forums-286aebd93bd49eac2ff80c3a6930f7f692a4c3ef.zip |
[ticket/10811] Fix AJAX callback alt_text so it can be repeated.
PHPBB3-10811
Diffstat (limited to 'phpBB/assets')
-rw-r--r-- | phpBB/assets/javascript/core.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/phpBB/assets/javascript/core.js b/phpBB/assets/javascript/core.js index 958b6c9ff6..74c71fca79 100644 --- a/phpBB/assets/javascript/core.js +++ b/phpBB/assets/javascript/core.js @@ -436,11 +436,12 @@ phpbb.add_ajax_callback = function(id, callback) * 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(data) { +phpbb.add_ajax_callback('alt_text', function() { var el = $(this), alt_text; alt_text = el.attr('data-alt-text'); + el.attr('data-alt-text', el.text()); el.attr('title', alt_text); el.text(alt_text); }); |