jQuery UI draggable() and resizable()
- by foxlance
I want to write the draggable() and resizable() code in such a way that all future elements with a particular class will inherit those plugins without calling them again.
$('div.resizeMe').resizable({
containment: 'parent',
minWidth: 400,
minHeight: 200
})
When the above code is executed, all divs with resizeMe class inherits the resizable() function. But if I appended BODY with a new div with the same class, I needed to execute that code again. So my goal here is how to rewrite that code such that it will work for all and including future elements.