how can i merge the results of two select statments with jquery?
for example i have
var previous = $(this).prev('td');
var next = $(this).next('td');
how do i then combine the two sets of results into one?
var all = $.merge(previous, next);
Try:
var all=$(this).prev('td').add( $(this).next('td') );
You can use empty collection
var previous = $(this).prev('td'),
next = $(this).next('td'),
buttons = $().add(previous).add(next);
Example: http://jsfiddle.net/UBnMm/
Alternatively:
var buttons = $(this).prev('td').add($(this).next('td'));
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With