jQuery UI #6723

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

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/6723">jQuery UI bug #6723</a> - The <code>helper</code> of a <code>resizable</code> cannot be changed after a <code>resizable</code> is initialized.</p>

<div id="resizable"></div>

CSS

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

#resizable {
    border: 1px solid black;
    height: 100px;
    width: 100px;
}

.ui-red { border: 1px dotted red; }
.ui-blue { border: 1px dotted blue; }

JavaScript

$('#resizable')
    .resizable({ helper: 'ui-red' })
    .resizable('option', 'helper', 'ui-blue');