jquery:resizable with scrollable content
see http://stackoverflow.com/questions/3858460/jquery-ui-resizable-with-scroll-bars/
by Ravindra Athreya
HTML
<script src="https://code.jquery.com/ui/1.11.2/jquery-ui.min.js"></script>
<link rel="stylesheet" href="https://code.jquery.com/ui/1.11.2/themes/black-tie/jquery-ui.css">
<div id="container" class="resizable">
<div id="handle" class="ui-resizable-handle ui-resizable-n"></div>
</div>
CSS
body {
height: 1000px;
}
#container {
width: 100%;
background: lightgray;
height: 100px;
position: fixed !important;
top: auto !important;
bottom: 0 !important;
left: 0;
right: 0;
}
#handle {
width: 100%;
height: 5px;
top: -6px;
background-color: #000;
}
JavaScript
$(document).ready(function () {
$( ".resizable" ).resizable({
handles: {
'n': '#handle'
},
resize: function( event, ui ) {
maxheight = 250;
ui.size.height = ui.size.height > maxheight ? maxheight : ui.size.height;
}
});
});