mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-02-05 10:53:28 -05:00
- by default, the menu is open - if Javascript is enabled/loaded, the links are hidden, and visual cues (▶) to show that it can be opened are added - clicking it opens and closes it
19 lines
306 B
JavaScript
19 lines
306 B
JavaScript
(function(Modules) {
|
|
"use strict";
|
|
|
|
Modules.Dropdown = function() {
|
|
|
|
this.start = function(component) {
|
|
|
|
$('.dropdown-toggle', component)
|
|
.on(
|
|
'click', () => $(component).toggleClass('js-closed')
|
|
)
|
|
.trigger('click');
|
|
|
|
};
|
|
|
|
};
|
|
|
|
})(window.GOVUK.Modules);
|