Is there a way to set multiple alsoResizes in jQuery UI?
$('.selector').resizable({ alsoResize: '.ot开发者_运维技巧her' });
I would like to set a couple of other elements to also resize, not just one. The official documentation tells nothing.
try
$('.selector').resizable({ alsoResize: '.other,.another,.andmanymore' });
this can be done by combining the div s.
var foo = $('.foo').attr('id');
var bar = $('.bar').attr('id');
var bar = $('.bar').attr('id');
var alsos = '#' + foo + ', #' + bar;
$('.selector').resizable({
alsoresize:alsos,
});
If you have object reference then you can use like this:
$(el).resizable(
{
alsoResize: [ el.children[0], el.children[1] ]
});
You can pass in an array of strings like so:
$('.selector').resizable({ alsoResize: [
'.other',
'.and-another',
'#and-one-more'
]});
These strings should represent selectors. You can also resize by class or id.
精彩评论