Multiple alsoresize problem with jQuery UI resizable

Multiple alsoresize problem with jQuery UI resizable

I need to have several entities resize together using the "alsoresize" parameter of resizable. Normally I would just put multiple selectors in a single parameter like this:

alsoresize: '.foo, .bar',

The problem is that I'm using jQuery objects as the targets for the alsoresize:

var foo = $(.foo);
var bar = $(.bar);
$('.selector').resizable({
alsoresize:foo, 
alsoresize:bar,
});

This doesn't work because you can't call "alsoresize" twice. Is there any way to combine the objects "foo" and "bar" so that I can call "alsoresize" once but have it affect both objects?