aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/assets/javascript/core.js
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/assets/javascript/core.js')
-rw-r--r--phpBB/assets/javascript/core.js16
1 files changed, 8 insertions, 8 deletions
diff --git a/phpBB/assets/javascript/core.js b/phpBB/assets/javascript/core.js
index 6285a16734..6a008ba1ec 100644
--- a/phpBB/assets/javascript/core.js
+++ b/phpBB/assets/javascript/core.js
@@ -957,12 +957,6 @@ phpbb.addAjaxCallback('toggle_link', function() {
$anchor.each(function() {
var $this = $(this);
- // Toggle link text
- toggleText = $this.attr('data-toggle-text');
- $this.attr('data-toggle-text', $this.text());
- $this.attr('title', $.trim(toggleText));
- $this.text(toggleText);
-
// Toggle link url
toggleUrl = $this.attr('data-toggle-url');
$this.attr('data-toggle-url', $this.attr('href'));
@@ -970,8 +964,14 @@ phpbb.addAjaxCallback('toggle_link', function() {
// Toggle class of link parent
toggleClass = $this.attr('data-toggle-class');
- $this.attr('data-toggle-class', $this.parent().attr('class'));
- $this.parent().attr('class', toggleClass);
+ $this.attr('data-toggle-class', $this.children().attr('class'));
+ $this.children('.icon').attr('class', toggleClass);
+
+ // Toggle link text
+ toggleText = $this.attr('data-toggle-text');
+ $this.attr('data-toggle-text', $this.children('span').text());
+ $this.attr('title', $.trim(toggleText));
+ $this.children('span').text(toggleText);
});
});