Jump to content

I\IewUser

Members
  • Content Count

    1
  • Joined

  • Last visited

Community Reputation

0 Neutral

About I\IewUser

  • Rank
    Newbie
  1. So i have a table with both names and numerical values and I'm really struggling to figure out how to sort both. What do I need to modify in order for it to sort numbers as well? My table has 8 columns. function sortTable(n) { var table, rows, switching, i, x, y, shouldSwitch, dir, switchcount = 0; table = document.getElementById("funds"); switching = true; dir = "asc"; while (switching) { switching = false; rows = table.rows; for (i = 1; i < (rows.length - 1); i++) { shouldSwitch = false; x = rows[i].getElementsByTagName("TD")[n]; y = rows[i + 1
×
×
  • Create New...