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 the browser.
<table id="promo" class="display">
<table id="official" class="display">
But I need to them to both link to the same script function. As you can see below, I have one for #promo and one for #official but they are both using the exact same code:
$(document).ready(function() {
$('#promo').DataTable( {
// does a TON of stuff here
} );
$('#official').DataTable( {
// does a TON of stuff here
} );
Is there a way to make both tables link to the same code in a script?