Single row select with data loaded from server

Single row select with data loaded from server

DukeKDukeK Posts: 1Questions: 0Answers: 0
edited October 2011 in General
I'd like to click on the rows and open a new page based on the row id (a hidden column) that was clicked on. I've noticed that you can not use the selector $('#example tbody tr') when data is loaded using AJAX, because the tr's (or td's for that matter) don't exist yet. I think I can set a post-draw callback function to accommodate this case, but I don't know what to put in the callback function, since it is called once after drawing, instead of anytime there is a click.

Thanks for a great, free component!

Replies

  • fbasfbas Posts: 1,094Questions: 4Answers: 0
    $('#example tbody tr').live('click', function () { ... }); should do the trick.
This discussion has been closed.