danivalentin
danivalentin

Reputation: 1687

JQuery resizable with a knob

I am using jQuery-ui Resizable - and i want to use a knob instead of the borders (my knob is a button in the bottom right).

I see that in options I have a KnobHandles, that I have to set to true.

Where do I set my handle? I tried to set it in the handles option but it is not working.

Below is my code:

window.resizable({
    'handles':'handler-resize',
    'knobHandles': true
});

UPDATE: just noticed that the knobhandles is some default stuff. I want to resize it with a customized button, is there a way?

Upvotes: 1

Views: 2201

Answers (2)

gabriel
gabriel

Reputation: 1807

Each handle string (if specified) should be in the form of a jQuery selector matching the child element of the resizable to use as the handle.

So I think you want something like:

'handles': '.handler-size'

Upvotes: 1

danivalentin
danivalentin

Reputation: 1687

i did it, i just had to style the knobs...

btw: handles must come with direction like s, n, se, ...

Upvotes: 1

Related Questions