summaryrefslogtreecommitdiff
path: root/modules/toolbar/toolbar.js
diff options
context:
space:
mode:
Diffstat (limited to 'modules/toolbar/toolbar.js')
-rw-r--r--modules/toolbar/toolbar.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/modules/toolbar/toolbar.js b/modules/toolbar/toolbar.js
index 9c07f78bd..18b366102 100644
--- a/modules/toolbar/toolbar.js
+++ b/modules/toolbar/toolbar.js
@@ -15,6 +15,16 @@ Drupal.behaviors.admin = {
Drupal.admin.toolbar.toggle();
return false;
});
+
+ // Set the most recently clicked item as active.
+ $('#toolbar a').once().click(function() {
+ $('#toolbar a').each(function() {
+ $(this).removeClass('active');
+ });
+ if ($(this).parents('div.toolbar-shortcuts').length) {
+ $(this).addClass('active');
+ }
+ });
}
};