Accessing DIV data that is delivered within a DataTables AJAX call

Accessing DIV data that is delivered within a DataTables AJAX call

rmayerrmayer Posts: 5Questions: 1Answers: 0
edited June 2016 in Free community support

Hello,

I have a DataTables implementation that uses its AJAX method to retrieve data to populate the table.

Due to the complex nature of the table, there are DIV tags and other HTML elements delivered in some of the columns of each row.

I am trying to implement a JQuery.ContentMenu to work one records within the table, enabling a right click on a name in the DataTable list, but to make it useful, I need to be able to identify the record.

I had hoped that I could use a div data-pid="12345" Some Name /div>, or even just the id="12345" attribute and then address the referring DIV to obtain this data. This method works outside of the DataTables context and I am convinced that it is to do with the DIV (delivered through AJAX) being unavailable to the DOM at the point the ContentMenu is implemented, but don't know how to get around it.

If anyone can help, I'd appreciate it.

Richard

This discussion has been closed.