The plugin does not support it by default, so I made the goal for you. I just encoded the div in the function for the resize event
, this is for you to make it dynamic;).
var total_width = 500; $("#div1").resizable({ grid: [1, 10000] }).bind( "resize", resize_other); function resize_other(event, ui) { var width = $("#div1").width(); if(width > total_width) { width = total_width; $('#div1').css('width', width); } $('#div2').css('width', (total_width - width)); }
Script example
Hope this helps!
source share