Click event not working with AJAX

Click event not working with AJAX

gtsafasgtsafas Posts: 13Questions: 0Answers: 0
edited February 2010 in General
Hello, I searched the forum and tried the advice did not work for me. I am trying to use the select multiple rows functionality in my data table. I have tried the following with no prevail.

[code]
var mytable;

$(document).ready(function() {

mytable = $('#eData').dataTable( {
"bProcessing": false,
"bJQueryUI": false,
"bPaginate": false,
"sAjaxSource": 'source.txt',
"iDisplayLength": -1,
"aoColumns":[
/*Paired*/ null,
/*Price */ { "bVisible": false },
/*Percentage*/ { "bVisible": false },
/*Previous*/ { "bVisible": false },
/*Status*/ { "bVisible": false }],
//"sDom": 'lfr<"fixed_height"t>ip'
} );

$ (mytable.fnGetNodes()).click ( function() { alert("TEST");});

} );
[/code]

Replies

  • gtsafasgtsafas Posts: 13Questions: 0Answers: 0
    Sorry saw someone mention using live closed window though. Solution example as follows

    [code]
    $ ('#eData tr').live ('click', function() {
    if ( $(this).hasClass('row_selected') )
    $(this).removeClass('row_selected');
    else
    $(this).addClass('row_selected');

    [/code]
This discussion has been closed.