javascript - jQueryUI Resizable alsoResize can't be passed $(this).next() -


when using jqueryui .resizable() function, i'm trying cause next element in dom resized. can pass jquery selector, or string class or id alsoresize method, can't pass $(this).next() select next element in dom.

my code:

$(selector).resizable({ alsoresize:$(this).next() });

you can run fiddle here, , uncomment lines 67/68 see work/not work.

http://jsfiddle.net/wpgzz/706/

it's because this referring document (you can see doing console.log(this)). if change alsoresizereverse: $("#resizable").next() should work you.

edit

you can this:

$.each($("#colors li"), function(index, value) {   $(this).resizable({ alsoresize:$(this).next() }) }); 

Comments

Popular posts from this blog

linux - xterm copying to CLIPBOARD using copy-selection causes automatic updating of CLIPBOARD upon mouse selection -

c++ - qgraphicsview horizontal scrolling always has a vertical delta -