In my JQueryUI test of resizable and sortable elements when I attempt to add objects dynamically, it loses its ability to be resized. It works well when it is statically included in the HTML DOM.
HTML
<button id="content">click</button>
<div class="row-fluid" id="sortable"></div>
CSS
.sort_container {
transition: all 0.1s linear;
min-width: 150px;
max-width: 400px;
min-height: 250px;
max-height: 250px;
padding: 0.5em;
border: 1px solid #ccc;
border-radius: 8px;
margin-left: 10px;
float: left;
position: relative;
cursor: grab;
background-color: rgba(240, 240, 240, 0.3);
}
#segrip {
width: 10px;
height: 35px;
background-color: #888;
bottom: 5px;
right: -5px;
border-radius: 8px;
position: absolute;
cursor: ew-resize;
}
JS
var customElement =
"" +
'<div class="span6 sort_container">' +
' <div class="well">1</div>' +
' <div class="ui-resizable-handle ui-resizable-se" id="segrip"></div>' +
"</div>" +
"";
$(document).ready(function () {
$(function () {
$("#sortable").sortable();
});
$(".sort_container").resizable({
handles: {
se: ".ui-resizable-se"
}
});
$("#content").on("click", function (e) {
$(customElement).appendTo($("#sortable"));
});
});