From 8d202d432b7cd785599a4c213fb4c3d812cddff6 Mon Sep 17 00:00:00 2001 From: Alejandro Lira Date: Tue, 26 May 2015 11:38:09 -0300 Subject: [PATCH] Update buttons.js Update/Fix for show menu in :hover event. --- js/buttons.js | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/js/buttons.js b/js/buttons.js index 1cf2591..e4442c8 100644 --- a/js/buttons.js +++ b/js/buttons.js @@ -111,5 +111,22 @@ $(document).on('click', '[data-buttons=dropdown] > a', function(e) { e.preventDefault(); }); + + /* Barzon Added 20150526 */ + //ON MOUSEENTER EVENT ADDED IF WANT TO DISPLAY MENU + $(document).on('mouseenter', '[data-buttons=dropdown]', function () { + $('[data-buttons=dropdown]').each(function () { + $(this).find('ul').hide(); + }); + $(this).find('ul').show(); + }); + $(document).on('click', function () { + $('[data-buttons=dropdown]').each(function () { + if ($(this).find('ul').css('display') === 'block') { + $(this).find('ul').hide(); + } + }); + }); +/* Barzon End */ -})( jQuery, window, document); \ No newline at end of file +})( jQuery, window, document);