Skip to content
Snippets Groups Projects
Commit e8b5f468 authored by Alex Pott's avatar Alex Pott
Browse files

Issue #2341267 by tohesi, nod_, gaas, gendoas, droplet, DuaelFr, bartvig: Bind...

Issue #2341267 by tohesi, nod_, gaas, gendoas, droplet, DuaelFr, bartvig: Bind event handlers for future multiple toolbars
parent 2fdc2ea2
Branches
Tags
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
...@@ -157,15 +157,15 @@ ...@@ -157,15 +157,15 @@
} }
} }
// Bind event handlers.
$(document)
.on('click.toolbar', '.toolbar-box', toggleClickHandler)
.on('click.toolbar', '.toolbar-box a', linkClickHandler);
// Return the jQuery object. // Return the jQuery object.
return this.each(function (selector) { return this.each(function (selector) {
var $menu = $(this).once('toolbar-menu'); var $menu = $(this).once('toolbar-menu');
if ($menu.length) { if ($menu.length) {
// Bind event handlers.
$($menu)
.on('click.toolbar', '.toolbar-box', toggleClickHandler)
.on('click.toolbar', '.toolbar-box a', linkClickHandler);
$menu.addClass('root'); $menu.addClass('root');
initItems($menu); initItems($menu);
markListLevels($menu); markListLevels($menu);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment