I used context menu plugin and was able to make if functional on the page I currently developing. At right click, I want to run a code (such as to highlight a selected row or column) before showing the context menu. Where can I insert the code. I used the plugin on this link. http://www.trendskitchens.co.nz/jquery/contextmenu/
My html:
<table>
<tr><td></td><td></td></tr>
<tr><td></td><td></td></tr>
<tr><td></td><td></td></tr>
<tr><td></td><td></td></tr>
<table>
My js (context menu)
$("table tr td").contextMenu('myMenu',{
onContextMenu: function(e){
// I want to process the selected 'td' or 'tr' here... ex. highlight it
}
});