0

Im trying to get a custom handle work with jquery ui resizable widget, but when I use the handles option to pass in a jquery reference to another element, it fails. From what Iv read from the documentation and other examples on the web, this should work just fine.

<div class="layer">
<div class="left">left</div>
<div class="center">center</div>
<div class="right">right</div>
</div>
​
$('.layer').resizable({
    handles: {
        'e': $('.right')
    }
});
​

Here's a fiddle: http://jsfiddle.net/MatteS75/3dwVp/

2 Answers 2

0

I found a workaround.

By setting the handles option to null, and setting the classes myself, I got my custom handle to work. This required some investigation in the jquery ui code to figure out.

<div class="layer" style="width: 150px;">
<div class="left">left</div>
<div class="center">center</div>
<div class="right ui-resizable-handle ui-resizable-e">right</div>
</div>
​
$('.layer').resizable({
    handles: null
});
​

http://jsfiddle.net/MatteS75/3dwVp/7/

However, I do think this is a jquery ui bug, releated to this question: overriding a jquery ui widget string option with an object

Sign up to request clarification or add additional context in comments.

Comments

0

This is a bug that has been fixed very recently:

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

https://github.com/jquery/jquery-ui/commit/9b908878ae3a9c0fbbd9958b579f223a648c5c69

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.