RickStrahl / jquery-resizable

A small jQuery plug-in to make DOM components resizable
MIT License
234 stars 91 forks source link

When I add handleSelector class all the instances resize at the same time. #1

Closed zardaloop closed 8 years ago

zardaloop commented 8 years ago

I have couple of element on the page which I am using the same class for their handler which is handleSelector: '.win-size-grip' as you had in your example. Is there anyway that the resize only applies to the handler within a div or textarea but not others?

RickStrahl commented 8 years ago

You have to use a selector that specifically matches that element or element group. If you mark the <div> with a custom class or an #id you can do use:

$(el).resizable( { handleSelector: "#MyDiv .win-size-grip" } )

The resizing should only affect the element that's being resized though regardless of whether they are all selected.

Alternately using specific class names for each group probably wouldn't be a bad idea either.