jQuery UI可调整大小
问题描述:
我正在研究jQuery UI可调整大小的方法,我必须DIV(一个旁边的)。我希望能够调整一个,并相应地改变另一个。一个DIV变大,另一个DIV变小...jQuery UI可调整大小
$(document).ready(function() {
$("#right").resizable({
alsoResize: '#left',
});
$("#left").resizable({
alsoResize: '#right',
});
});
感谢, 最大
答
你要扎入“调整”事件(http://docs.jquery.com/UI/Resizable#event-resize)
$("#right").resizable({
resize: function(event, ui) {
// look at the size of the ui element being resized
// and resize the left accordinly
}
});
答
它看起来不错,但尝试你的数组的末尾删除逗号,因为你没有任何更多的数组元素。
$(document).ready(function() {
$("#right").resizable({
alsoResize: '#left'
});
$("#left").resizable({
alsoResize: '#right'
});
});
是这个工程然而,这重新调整左侧大小相同的权利。我想让左边变小一点,让右边更大...... – mistero 2009-06-25 16:42:02