Clickable row with datatables
How do I go with making a tr
clickable while using datatables, though yet keeping the original browser's menu so they can middle-click for new tab or rightclick for the original browsers menu? (such as open in new tab, page, copy link, etc.) ?
I've tried Superlink, but this does not work in all browsers, I need it to be cross-browser (IE7 a开发者_如何学运维nd newer!)
Any tips/tricks?
check this example from DataTables: select_row and see if helps you.
see the source Initialisation code
This works!
oTable = $('#RectifiedCount').dataTable( ....);
$('#RectifiedCount tbody tr').live('click', function (event) {
var aData = oTable.fnGetData(this); // get datarow
if (null != aData) // null if we clicked on title row
{
//now aData[0] - 1st column(count_id), aData[1] -2nd, etc.
alert("equis");
}
});
精彩评论