≡
×
Plus
Manual
Examples
Reference
Download
Blog
Community
Support
Make row/cell clickable
Make row/cell clickable
naakheel
Posts: 1
Questions: 0
Answers: 0
July 2011
edited July 2011
in
General
I tried $('#example tbody td').click & $('#example tbody tr').click both do not seem to work.
I m loading the datatable with JSON thru Ajax using fnServerData.
Replies
fbas
Posts: 1,094
Questions: 4
Answers: 0
July 2011
if you call $('#example tbody td').click() BEFORE you load the data, the data that is added after does not have the event handler associated with it.
if you use $('#example tbody td').live(), even if the data comes later, live() will make sure to add the event handlers to them.
This discussion has been closed.
Replies
if you use $('#example tbody td').live(), even if the data comes later, live() will make sure to add the event handlers to them.