Ok, basically, I have an element that I get which happens to be a <tr> element.
But If I find a <td> element with a rowspan that is greater than 1, within any of the <tr> elements, I need to exclude these <tr> elements, starting with the $(“td”).parent() of where the rowspan > 1, and I need to exclude all other <tr> elements up to the rowspan quantity within an each()
So something like this:
$("td").each(function{
if ($(this).attr('rowspan') > 1)
var curRowspan = $(this).attr('rowspan');
// So now rowspan can equal 2, 3, 4, 5, and higher.
// Now I need to exclude the NEXT <tr> elements based on the quantity of rowspans.
// So if the rowspan = 2, than I need to exclude $(this).parent() and $(this).parent().next() which seems easy enough, but I need this to work on more than 2 rowspans also. Needs to exclude the current <tr> element and all <tr> elements after, until it reaches the rowspan quantity indicated by curRowspan.
// HOW TO DO THIS and return false out of the each() for each of these `<td>` elements within that quantity of `<tr>` elements indicated by the rowspan of a `<td>` element???
});
You could add a class to indicate you are ignoring that row. I feel as though there is a better way to optimize this selector though. Slice looks promising.
http://jsfiddle.net/UG35Q/2/