(function ($, Drupal) {
Drupal.behaviors.fixButton = {
attach: function() {
$( ".button" ).removeClass( "success" );
$('.has-dropdown').addClass('not-click');
$(".has-dropdown > a").click(function(event){
event.preventDefault();
$(this).trigger("hover");
if (!$(this).hasClass("menu-icon")) {
$(this).off('click').click();
}
});
$(".has-dropdown > span").click(function(event){
event.preventDefault();
$(this).trigger("hover");
});
$(".overflow-menu").click(function(event){
console.log('button clicked');
$(this).trigger("hover");
});
}
}
})(jQuery, Drupal);