Skip to content

Callback beforeOpen to execute code before showing menu#16

Closed
mc7244 wants to merge 2 commits intojoewalnes:masterfrom
mc7244:master
Closed

Callback beforeOpen to execute code before showing menu#16
mc7244 wants to merge 2 commits intojoewalnes:masterfrom
mc7244:master

Conversation

@mc7244
Copy link

@mc7244 mc7244 commented Oct 30, 2013

This adds a callback which can be provided with:

$("#whatever").contextPopup({
beforeOpen : function(e) {
// Content
},
items: [
// ...
]
});

This is very useful in situation where you want to change something before actually showing the menu. For example I use it to select a table row (i.e. paint it orange) before showing the menu for it.

@joewalnes
Copy link
Owner

Hi Michele

Thanks for the contribution. Please could you add an explanation of the new feature to the comments in the file header, and README.

Thanks
-Joe

@mc7244
Copy link
Author

mc7244 commented Nov 14, 2013

Ok! I opened another pull request with the patch including documentation.

@mc7244 mc7244 closed this Nov 14, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments