I'd like to combine two filter functions I'm using to select a few elements in a table. my code looks like this:
a = $('table td').filter(function(index) {
return index >= number1
});
b = $('table td').filter(function(index) {
return index < number2
});
merge = $.merge(a, b);
The elements from a have to be first and in one row. so if a returns 3 elements they have to be in one row, follow by the elements from b. how can I achieve that? can I combine the filter functions from above?