Reputation: 5203
There are several tables, where row id - is the number of records in the database, there is a problem. If there are few tables on the page, the id will be repeated. And it's not good, because jQuery does not work correctly because of dublicate id's. I only have 2 outputs:
But I don't like both of them. Maybe there is a normal solution to this problem?
Upvotes: 0
Views: 51
Reputation: 96326
Maybe you need none of them?
Use a selector for all tables, then filter for the number of rows (or whatever you use for displaying the rows..)
Upvotes: 0
Reputation: 169551
Option 3. Use HTML5 data-
attributes to store meta data.
Then just set it on the table
$("table#someId").data("database-records", number)
Upvotes: 7