I have two tables that need to have different IDs or they will not work. I\'m using 3rd party data table code that uses the ID to differentiate between the different tables in t
$('.display').each(function(){ $(this).DataTable({ // does a TON of stuff here }); });
This way you will not have to add each and every id manually. Just add .display to the elements.
id
.display