sydcanem / bootstrap-contextmenu

Context menu plugin for Twitter's Bootstrap framework
http://sydcanem.com/bootstrap-contextmenu/
645 stars 193 forks source link

`before` function had to explicitly return true to show #76

Closed dsherret closed 9 years ago

dsherret commented 9 years ago

In the current code, the following code from the README.MD will not show the contextmenu:

$('.context').contextmenu({
  target:'#context-menu', 
  before: function(e,context) {
  },
  onItem: function(context,e) {
  }
});

This is because the before function must return true in order to show. The documentation only talks about returning false to not show the context menu. I've committed a fix that will only not show the context menu if the before function returns false.