jPushMenu icon indicating copy to clipboard operation
jPushMenu copied to clipboard

jPushMenu and Bootstrap

Open ciro207 opened this issue 12 years ago • 6 comments

Dear Takien, thanks for the great jog you did with jPushMenu.

I tried to use with Bootstrap Framework (http://twitter.github.io/bootstrap/), but e.stopPropagation() disabled dropdown functionality inside .cbp-spmenu nav. If you set closeOnClickOutside: false everything works fine, but obviously it is impossible to click outside.

You can check an example here http://jsfiddle.net/J3NeP/16/

Thanks so much!!

ciro207 avatar May 18 '13 05:05 ciro207

Hi, you can disable it set closeOnClickOutside to false

jQuery(document).ready(function($) {
$('.toggle-menu').jPushMenu({
  closeOnClickOutside:false
});
});

takien avatar May 18 '13 06:05 takien

Hi, I know I can, but clicking outside is a very natural way to close the menu It is an importante feature

ciro207 avatar May 18 '13 07:05 ciro207

I was able to accomplish both by taking out: ('.cbp-spmenu,.toggle-menu').click(function(e){ e.stopPropagation(); });

and changing this, as recommended above by takien:

jQuery(document).ready(function($) { $('.toggle-menu').jPushMenu({ closeOnClickInside:false }); });

aokeefe17 avatar Mar 18 '14 15:03 aokeefe17

I should say similar to what was recommended by Takien, as I changed the closeOnClickOutside:false to closeOnClickInside:false

aokeefe17 avatar Mar 18 '14 15:03 aokeefe17

is the

('.cbp-spmenu,.toggle-menu').click(function(e){ 
e.stopPropagation(); 
});

required? I tried using closeOnClickInside: false in my call to jPushMenu(...), and I was still getting the same error I was getting for a logout link. I don't want to break anything, but my logout link seems to work without that click handler...

jakehockey10 avatar Feb 24 '15 08:02 jakehockey10

jPushMenu is not working with bootstrap 3.3 accordion.

arun99178 avatar Apr 30 '15 15:04 arun99178