Make your elements draggable and resizeable with Resizeable.js
Hello, I’m still alive and I want to share a useful JavaScript class: Resizeable.js. It allows to make draggable and resizeable your DOM elements!
How it works?
new Resizeable('element');
Your element has now two sensible areas: the border area and the central area. If you click on the central area and move the mouse around, keeping the left button pressed, your element will be dragged. If you are on the border area, and perform the same gesture, your element will be resized.
The default size of the border area is 6px, but you can customize it via the options passed to the constructor:
new Resizeable('element', {top:12, right:12, bottom:12, left:12});
Try it now!
Try it now on the demo page.
Credits and License
Resizeable.js is based on Thomas Fakes homonym class and on Thomas Fuchs Scriptaculous, this means it depends on Prototype(1.6.0+) and Scriptaculous (1.8.0+) itself.
Resizeable.js is Free-Software, distributed under the MIT License.
Download
Resizeable.js (md5: aae8256ab0eff3972a03ed67e238e623).