row select in table
row select in table
var 123;
$(function() {
123 = $("#1234").dataTable({
"sScrollY": "209px",
"bPaginate": false,
"bScrollCollapse": true,
"bFilter": false,
"bAutoWidth" :true,
"bProcessing": true,
"sAjaxSource": "Data/Table_Browse_ClusterList.txt"
});
$("#1234 tbody tr").click( function( e ) {
if ( $(this).hasclass('row_selected') ) {
$(this).removeClass('row_selected');
}
else {
123.$('tr.row_selected').removeClass('row_selected');
$(this).addClass('row_selected');
}
});
-------------
I need to fix my source code. I want to select rows in table and do something with that rows but I can't select rows.
what's wrong?
I hope your help.
$(function() {
123 = $("#1234").dataTable({
"sScrollY": "209px",
"bPaginate": false,
"bScrollCollapse": true,
"bFilter": false,
"bAutoWidth" :true,
"bProcessing": true,
"sAjaxSource": "Data/Table_Browse_ClusterList.txt"
});
$("#1234 tbody tr").click( function( e ) {
if ( $(this).hasclass('row_selected') ) {
$(this).removeClass('row_selected');
}
else {
123.$('tr.row_selected').removeClass('row_selected');
$(this).addClass('row_selected');
}
});
-------------
I need to fix my source code. I want to select rows in table and do something with that rows but I can't select rows.
what's wrong?
I hope your help.
This discussion has been closed.
Replies
Allan
and sorry I didn't express exactly my code
actually 123 is just a symbol in there. real Id in my code isn't 1234 or 123
I guess the problem is.....
"sAjaxSource": "Data/Table_Browse_ClusterList.txt"
because my code ran well before addition that code.
I changed the method to add data in table(tbody)