Skip to content
Advertisement

Sort two tables in same function using Javascript

I need to sort these two tables in the same function. When I click name in first table so it will sort second table also by name.

I have this function where can sort table and it is working, but it only sorts one table.

What changes are needed to sort both tables?

JavaScript
JavaScript

Advertisement

Answer

You can run sortTable function for each table.

JavaScript

JavaScript
JavaScript
User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement