I arranged two containers horizontally using the position: absolute
property. I am attempting to create a "resize bar" in the center that, when dragged, will expand one container while shrinking the other (thus maintaining the overall width).
<div class="container left"></div>
<div id="resizeBar"></div>
<div class="container right"></div>
https://i.sstatic.net/tyrVs.png
To set them up, this is how I initialize:
function initUI () {
$('.container').resizable({handles: 'e,w'});
$('#resizeBar').draggable({axis: 'x'});
}
I want the E handle of the left container and the W handle of the right container to move along with the resize bar as I drag it. Is there a built-in feature in jQuery UI for accomplishing this? If not, what is the most effective approach?