I have a lot of <tr> elements. Each important one is marked with a class name containing “highlight-delete”. How can I iterate over the whole set of them, and write each of their .innerHTML to the console? I tried this but it failed
$.each('tr[class*=highlight-delete]', function (index, item) {
console.log(item.innerHTML);
});
The first parameter of the
eachfunction should be anarrayorobject, you are passing a string: