I have this code right now:
var table = $(source).children('table').map(function() {
if (this.rows.length >= 4) {
return $(this).outerHTML();
} else {
return null;
}
}).get();
This will get tables by number of rows, but how would I get the tables by row height (if height < 100 px) also and also alert if no tables are in the array (if the array is empty).
You could use
.is()method, like this:What are we doing with
.is()? We are searching if at least one of the childrentrhas height lower than 100, and ignore the table if this condition is not fulfilled.Hope this helps. Cheers
EDIT For your new demands: