I have a table which is loaded with data via ajax using datatables.net. I'd like to make it so that when the user clicks on a row it links to a URL appended with the get variable of that row's primary key.
I'm rather new to Datatables so my hacked attempt/idea was to use Datatables to apply two classes two the column with my primary key. The two classes were hide (css of display:none) and projectID (identifying that column so I can grab it's value with jquery). I was able to apply those classes using the aoColumns property and it did hide the column and append the projectID class as well. However I think since Datatables is creating the table it's preventing me from using
$('#project-table tr').click(function(){alert('clicked');}
so I tried
$('#project-table tr').live('click',function(){alert('clicked');})};
Also to no avail.
I would imagine there is a better way than I'm using to make a row clickable, linking to a page with appended primary key get variable, but I couldn't find an example. If anyone has a link to an example or could point me in the right direction it'd be appreciated.