We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I am initialising the plugin with
new Tablesort(document.getElementsByClassName('trackTable'), { descending: true });
on a table that starts:
<table id="mySearchesTable" class="trackTable noSelect" cellpadding="0" cellspacing="0">
Yet I get the following error:
Uncaught Error: Element must be a table
The text was updated successfully, but these errors were encountered:
Document.getElementById(), which is the usual way of picking the table element, returns a scalar (an Element), while Document.getElementsByClassName() returns a vector (an HTMLCollection).
Document.getElementById()
Element
Document.getElementsByClassName()
HTMLCollection
If you're sure you have just one element with that class, try something like:
document.getElementsByClassName('trackTable')[0]
But it's much better if you pick the element by its ID!
(Please confirm that's the issue you're having, so I can close this :)
Sorry, something went wrong.
No branches or pull requests
I am initialising the plugin with
on a table that starts:
<table id="mySearchesTable" class="trackTable noSelect" cellpadding="0" cellspacing="0">
Yet I get the following error:
Uncaught Error: Element must be a table
The text was updated successfully, but these errors were encountered: