Reputation: 863
I have multiple divs with absolute positioning on a page, all with the same class. Is there a way to restrict resizing each of the divs so that they do not overlap any of the other divs of the same class?
Upvotes: 1
Views: 613
Reputation: 1013
You can use the resize event from jQuery-ui resizable. Calculate if your element is about to pass another elements top/left positions and prevent it from doing so by setting the maxWidth to it's current width.
Source: Prevent jQuery UI resizable element from covering another element?
Upvotes: 1