I am using DataTables(datatables.net) and I would like to add a context menu to my table.
I found jQuery contextMenu , as well as a description in the forum DataTablesabout how someone implemented the context menu. But it seems that at least DataTableswhich I am currently using (1.10) has evolved quite a lot. I have no information about the plugin Context Menu. (which means which version was used on this forum and what I downloaded).
If I use it, as described in the forum post, and adapt it to 1.10 (to my humble knowledge), I come to this
var myTable = $("#myTable ").DataTable( {
"drawCallback": function( settings ) {
$("#myTable tbody tr").contextMenu(
{
menu: 'myMenu'},
function( action, el, pos ) {
var aData = myTable.GetData( el.context );
}
);
}
} );
But executing this code will give me this error:
Search error: selector not specified in jquery.contextMenu.js: 1273
- DataTable 1.10?