Responsive Plugin on a DataTable With Custom Child Rows

Responsive Plugin on a DataTable With Custom Child Rows

ismithersismithers Posts: 1Questions: 1Answers: 0

Hi all, first of all thank you author for you awesome plugin. Its really made life easier on so many fronts. :)

I've used DataTables throughout a custom e-store that I've done for a client along with the responsive plugin that adds a little clickable icon to show hidden bits of data. All works great.

On my store page I have an issue with the Responsive plugin and what I must assume to be my use of a custom Child row to store some additional information. To clarify, each Row represents a product and then within my Child row I store variant information (such as sizes for clothing). The variant information has some clickable links that when clicked, grab some Row data like the product ID and variant ID, and then send the user to a page to view the specifics.

When the Responsive plugin kicks in, my code to get the data() from the row, no longer works.

I attach handlers to my links via:
.on('click', '.link_accordion', function () { // Code } );

Within the handler I get the row data via:
var guid = table.row($(this).parents('tr')).data()["ID"];

This works for desktop but will no longer function when moving to responsive, would anyone have some insight as to why? Potentially there is a better way to access the row data, and if so I am all ears. Thanks for any help!

This discussion has been closed.