jQuery UI #4310

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

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/4310">jQuery UI #4310</a> - Custom resizable handles do not work unless the ui-resizable-xy and ui-resizable-handle classes are added.</p>

<div class="container">
    <div class="border top_left"></div>
    <div class="border top_right"></div>
    <div class="border bottom_right ui-resizable-se ui-resizable-handle"></div>
    <div class="border bottom_left"></div>
    <div class="content">
        Some text.
    </div>
</div>

CSS

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

.container { border: 1px solid black; }
.border { width: 5px; height: 5px; }
.top_left { border: 1px solid red; }
.top_right { border: 1px solid blue; }
.bottom_right { border: 1px solid green; }
.bottom_left { border: 1px solid orange; }

JavaScript

$('.container').resizable({
    handles: {
        ne: '.top_right',
        se: '.bottom_right',
        sw: '.bottom_left',
        nw: '.top_left'
    }
});