Change Specific Element Resize Options in jQuery Resize -


i using jqueryui resizable widget, , have bunch of resizable boxes on page. when document loads, initialize widget, so:

$('.ui-draggable').resizable({     minheight: 10, // 10 default     minwidth: 10, // 10 default     resize: function() {         showproperties(this);     }, }); 

however, @ point want of elements change resize options. i'm trying this:

if (type == 'sometype') {     console.log($('#'+elementid).resizable('option', 'handles'));     $('#'+elementid).resizable('option', 'handles', 'e,w');     console.log($('#'+elementid).resizable('option', 'handles')); } 

this indeed outputs:

e,s,se e,w 

in console, event triggered , selector correct, code doesn't work: in fact, handles remain same, namely e, s, se.

is because i'm using different selector original init? if so, how can change resize options on subset of originally-resizable elements? , if not, problem?

handles divs added element on resizable applied. seems changing option doesn't refresh these handles. maybe there's way apply changes on specific subset , refresh, i'm not sure how. 1 quick workaround hide handles don't want instead of changing handle option. have set handle option handles you'll need, , hide not wanted. remove se handle example:

$('#'+elementid).find('.ui-resizable-se').hide(); 

Comments

Popular posts from this blog

angularjs - ADAL JS Angular- WebAPI add a new role claim to the token -

php - CakePHP HttpSockets send array of paramms -

node.js - Using Node without global install -