Quantcast
Channel: Free community support — DataTables forums
Viewing all articles
Browse latest Browse all 35281

Loading DT on third party site, after manipulating DOM?

$
0
0

I'm trying to launch DataTables on a website that is not my own, using TamperMonkey for Chrome (similar to GreaseMonkey for Firefox). The website in question is Discogs, and the TABLE has the ID "#versions" and appears on pages like this one: http://www.discogs.com/David-Bowie-David-Bowie/master/50884

It's the long list of releases I want to use with DataTables to enable sorting & searching.

  1. The first issue is to modify the TABLE as it's lacking a THEAD. That's easy.
  2. The second issue is to load dataTable on to this manipulated table. This is where I'm stuck... Is it even possible? Will dataTables even know I have modified the TABLE? I get the "Cannot read property 'mData' of undefined"-error no matter what. Is dataTables reading the original DOM and can't find my new fancy THEAD? The DataTables Debugger says "DataTables is not available on this page." - but inspecting the DOM reveals that there indeed is a "dataTable"-class on the TABLE, which I didn't put there, but that's it...

Viewing all articles
Browse latest Browse all 35281

Trending Articles