mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 22:28:51 +00:00
[ticket/10811] Fix AJAX callback alt_text so it can be repeated.
PHPBB3-10811
This commit is contained in:
parent
de7a166a59
commit
286aebd93b
1 changed files with 2 additions and 1 deletions
|
@ -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
|
* the alt-text data attribute, and replaces the text in the attribute with the
|
||||||
* current text so that the process can be repeated.
|
* 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),
|
var el = $(this),
|
||||||
alt_text;
|
alt_text;
|
||||||
|
|
||||||
alt_text = el.attr('data-alt-text');
|
alt_text = el.attr('data-alt-text');
|
||||||
|
el.attr('data-alt-text', el.text());
|
||||||
el.attr('title', alt_text);
|
el.attr('title', alt_text);
|
||||||
el.text(alt_text);
|
el.text(alt_text);
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Reference in a new issue