Click row on JQuery Data Table example
I'm using开发者_运维百科 jQuery DataTable Ajax grid. I want to trigger the row click event. I execute following code in sequence but it doesn't execute.
$('#category tbody tr').click(function () {
alert('e');
});
$(document).ready(function() {
var oTable = $('#category').dataTable( {
"bProcessing": true,
"bServerSide": false,
"sAjaxSource": "sources/category.txt"
} );
} );
For future reference. live function worked well.
$('#category tbody tr').live('click', function() {
alert('e');
});
精彩评论