Jquery UI Resizable html bug
jquery resizable stop working after call html on resizable element
by mauron85
HTML
<script src="https://code.jquery.com/ui/1.11.4/jquery-ui.min.js"></script>
<link rel="stylesheet" href="https://code.jquery.com/ui/1.11.4/themes/ui-lightness/jquery-ui.css">
<div class="container"></div>
CSS
.container {
height: 300px;
width: 300px;
background: silver;
padding: 100px;
}
.bar {
position: absolute !important;
background: red;
}
JavaScript
var $bar = $('<div class="bar">');
$bar.draggable({addClasses: false});
$bar.droppable({addClasses: false});
$bar.resizable({
handles: 'w, e'
});
$bar.css({
width: '100px',
height: '10px'
});
$bar.html('<div class="time">'); // only RESIZABLE STOP WORKING (draggable and droppable work)
$bar.appendTo('.container');