Is there a way to make this JavaScript Random Shuffle code in a table AMP compliant? Specifically, is there a way to convert the stringId to be the table's Id?
<script>function shuffleTable() { var table = document.getElementById("tableId"); var rows = table.rows; var numRows = rows.length; var tbody = rows[0].parentNode; for (i = 0; i < numRows; i++) { tbody.insertBefore(rows[Math.ceil(Math.random() * (numRows - 1))], rows[i]); } } shuffleTable()</script>
*I have found this code to be effective in regular HTML pages.