Check Whether A Class Exists In Any Row Of A Table In Javascript
I have a table (simplified for this question):
table data | tableSolution 1:
and basically attach to a button or link like this:
Solution 2:Have you considered using a library? Using jQuery this could be as simple as http://jsfiddle.net/andersand/QAb4s/ My experience is that by using a JS framework makes me not have to worry that much about cross browser compatibility, while also having increased development speed Solution 3:Without using an external library, you'd have to do something like the following:
For extra credit, you could put all of this into a function that takes the class you're looking for and the table in which to look as arguments. Assignments are due first thing Monday morning. |
Post a Comment for "Check Whether A Class Exists In Any Row Of A Table In Javascript"