Dynamically Resizing Flexigrid

579 views
Skip to first unread message

Nick McBride

unread,
Nov 17, 2009, 3:14:02 PM11/17/09
to Flexigrid for jQuery
I'm using JQuery's UI "resize" function to be able to resize some
elements on the page.

On one of my DIV containers I use the resize function to modify the
size of some other elements as the parent div container is resized:

$("#left-panel").resizable({
handles: 'e',
maxWidth: 300,
resize: function(event,ui){
$("#resizable1").css("width",$("#left-panel").width());
$("#right-panel").css("width", $(window).width() - $("#left-
panel").width()-30);
}
});

You will notice above that I'm dynamically changing the width of the
"right-panel" div. How can I access/set the width of the flexigrid
dynamically?

I've tried $("#flex1l").css("width", $(window).width() - $("#left-
panel").width()-30); but that doesn't do it.

Nick McBride

unread,
Nov 17, 2009, 4:34:41 PM11/17/09
to Flexigrid for jQuery
Ok, so a little more searching and I found what I needed: $
(".flexigrid").width($(window).width() - $("#left-panel").width
()-30);

This will change the width of the flexigrid based on the width of the
window subtracting a left panel.
Reply all
Reply to author
Forward
0 new messages