diff options
Diffstat (limited to 'theme/javascript/utils/dropdown.js')
-rw-r--r-- | theme/javascript/utils/dropdown.js | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/theme/javascript/utils/dropdown.js b/theme/javascript/utils/dropdown.js deleted file mode 100644 index fe4e1f4..0000000 --- a/theme/javascript/utils/dropdown.js +++ /dev/null @@ -1,27 +0,0 @@ -define([ - "jQuery" -], function($) { - - var toggleDropdown = function(e) { - var $dropdown = $(e.currentTarget).parent().find(".dropdown-menu"); - - $dropdown.toggleClass("open"); - e.stopPropagation(); - e.preventDefault(); - }; - - var closeDropdown = function(e) { - $(".dropdown-menu").removeClass("open"); - }; - - // Bind all dropdown - var init = function() { - $(document).on('click', ".toggle-dropdown", toggleDropdown); - $(document).on('click', ".dropdown-menu", function(e){ e.stopPropagation(); }); - $(document).on("click", closeDropdown); - }; - - return { - init: init - }; -}); |