Guest User

Untitled

a guest
Sep 24th, 2018
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. $(document).ready(function() {
  2. let tableData = [];
  3.  
  4. $('#referred_affiliates tbody tr td').each(function(index, element){
  5. tableData.push($(element).text());
  6. });
  7.  
  8. console.log(tableData);
  9. });
  10.  
  11. $(document).ready(function() {
  12. let tableData = [];
  13.  
  14. $('#referred_affiliates tbody tr').each(function (index, tr) {
  15. let row = [];
  16. tr.('td').each(function (rowId, rowData) {
  17. row[rowId] = rowData
  18. });
  19.  
  20. tableData.push(row)
  21. })
  22.  
  23. console.log(tableData);
  24. });
Add Comment
Please, Sign In to add comment