mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-30 21:40:43 +02:00
[ticket/10811] Fix AJAX callback alt_text so it can be repeated.
PHPBB3-10811
This commit is contained in:
@@ -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);
|
||||
});
|
||||
|
Reference in New Issue
Block a user