I have a number of table rows that are each assigned several classes. And one of those classes will be IndexN, where N is a number from 0 to 5 or so.
What is the easiest way to get the value of N for a given row.
I know I can use hasClass() but that would require calling it for all possible values of N. I also assume I can simply get the value of the class attribute but this will include the other classes as well.
Is there a better way?
data-index="n"attribute. It would save you a lot of hassle.<br class="index424"><br class="index8">...