scinote-web/app/assets/javascripts/sitewide/dropdown_submenu.js
G-Chubinidze 5eacd41ca5
Adding well plate table options to "insert step content" select menu [SCI-7931] (#5302)
* well plate implementation without nested dropdown

* Implement dropdown submenu [SCI-7931]

* minor code cleanup

---------

Co-authored-by: Giga Chubinidze <gchubinidze@unisens.ge>
Co-authored-by: Martin Artnik <martin@scinote.net>
2023-04-18 15:42:53 +02:00

12 lines
346 B
JavaScript

$(document).on('click', '.dropdown-submenu-item', function(e) {
e.preventDefault();
e.stopPropagation();
$(this).toggleClass('active');
});
$(document).on('click', '.dropdown-submenu', function(e) {
e.preventDefault();
e.stopPropagation();
$('.dropdown-submenu-item').removeClass('active');
$('.dropdown').removeClass('open');
});