javascript - How to dynamically toggle the `resizable` boolean in the jQuery UI Layout plugin? -
problem
i using jquery ui layout plugin (layout.jquery-dev.net/index.cfm) in web application.
using 2 panels (center , east), need dynamically disable resizable option of layout.
function initializelayout(selement) { var ooptions = { closable: false, resizable: true, slidable: false, east__livepaneresizing: true, east__maxsize: 672, east__minsize: 250, east__onresize_end: function() { // getoverlaysizes(); // setoverlaysizes(); // setpapersizes(); }, east__size: 250 }; olayout = $(selement).layout(ooptions); olayout.options.east.resizable = false; console.log(olayout.options); } this doesn't work, though resizable option set false on console.
questions
- how dynamically disable/enable
resizableoption ? - this has nothing problem, why enabling live pane resizing make mozilla firefox (20.0) slow ?
thanks,
solution
olayout.disableresizable("east"); olayout.enableresizable("east"); thanks @dwaddell.
here need do, after init:
olayout.disableresizable('east'); hope helps.
here updated jsfiddle: http://jsfiddle.net/dwaddell/ye2cq/
Comments
Post a Comment