jQuery UI #6230

http://bugs.jqueryui.com/ticket/6230

by TJ VanToll

HTML

<script src="http://code.jquery.com/jquery-1.8.2.js"></script>
<link href="http://code.jquery.com/ui/1.9.1/themes/base/jquery-ui.css" rel="stylesheet" />
<script src="http://code.jquery.com/ui/1.9.1/jquery-ui.js"></script>

<p><a href="http://bugs.jqueryui.com/ticket/6230">jQuery UI #6230</a> - Initializing a <code>resizable</code> on a wrapped element when initially hidden ends badly.</p>

<div id="container">
    <textarea></textarea>
    <img src="http://placekitten.com/100/100" />
</div>

CSS

body { padding: 20px; }
p { margin-bottom: 20px; line-height: 1.5; }

JavaScript

$('#container').hide();
$('textarea').resizable();
$('img').resizable();
$('#container').show();