takien / jPushMenu

Various slide menu
202 stars 89 forks source link

jPushMenu and Bootstrap #1

Open ciro207 opened 11 years ago

ciro207 commented 11 years ago

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!!

takien commented 11 years ago

Hi, you can disable it set closeOnClickOutside to false

jQuery(document).ready(function($) {
$('.toggle-menu').jPushMenu({
  closeOnClickOutside:false
});
});
ciro207 commented 11 years ago

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

aokeefe17 commented 10 years ago

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 commented 10 years ago

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

jakehockey10 commented 9 years ago

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...

arun99178 commented 9 years ago

jPushMenu is not working with bootstrap 3.3 accordion.