Blueprint-SlidePushMenus icon indicating copy to clipboard operation
Blueprint-SlidePushMenus copied to clipboard

Close menu click outside content

Open 3ilguun opened this issue 11 years ago • 5 comments

How about adding if click outside content menu close the menu?

3ilguun avatar Aug 23 '13 17:08 3ilguun

+1

bloccxx avatar Sep 25 '13 08:09 bloccxx

+1

licatajustin avatar Oct 07 '13 17:10 licatajustin

Opening and closing the menu is all controlled by CSS classes, so just tie a click event onto the page wrapper, or something along those lines, and use Classie to toggle the classes off.

trinadin avatar Jul 17 '14 18:07 trinadin

+1

nosov33 avatar Aug 28 '15 12:08 nosov33

$(function() { $("#showBottom").on("click", function(e) { $("#cbp-spmenu-s4").toggleClass("cbp-spmenu-open"); }); $(document).on("click", function(e) { if ($(e.target).is("#cbp-spmenu-s4, #showBottom") === false) { $("#cbp-spmenu-s4").removeClass("cbp-spmenu-open"); } }); });

Piulres avatar Feb 22 '17 20:02 Piulres