Is it possible to restrict where it looks for the certain text?
$(data,'table tr').each(function(){
});
Is what I have right now. Am I any where near right?
Is it possible to restrict where it looks for the certain text?
$(data,'table tr').each(function(){
});
Is what I have right now. Am I any where near right?
 
    
    See jQuery() (aka the $() function) and see the supported forms.
It would likely be $(selector, context) where context is "A DOM Element, Document, or jQuery".
Alternatively, create a jQuery object and then apply the appropriate traversing function(s).
Happy coding.
I believe this is what you're looking for: How to skip to next iteration in jQuery.each() util?
var arr = [ "one", "two", "three", "four", "five" ];
$.each(arr, function(i) {
    if(arr[i] == 'three') {
        return true;
    }
    alert(arr[i]);
});
You can check certain conditions on the tr, like, does it have children? And if so, skip to the next iteration.