jQuery('td[class=bgoff]').each(function() { var td = jQuery(this); ... no apply selector to 'this' only });
I’m working with tabular data in html and trying to parse the contents of each TD (they are not uniquely identifiable).
Using XPath, I can prepend the path of ‘this’ to additional selecting.
How can I achieve this with jQuery?
With jQuery you have the option of supplying a second parameter after the selector expression and that becomes a context that jQuery uses to limit scope of the lookup. Learn more here