Try caching the results of the selection, and chaining may help too. $("#dialog").parent().bind("resize", function(){
// cache the collection var dialog=$("#dialog"), content=$("#content"); content.height( dialog.height()-220).width( dialog.width()); } ); **--** Steve On Jan 15, 11:44 am, Jamie <jab...@mweb.co.za> wrote: > HI Steven > > Your tip helps alot! Thank you.. Here's what I did: > > $("#dialog").parent().bind("resize", function(){ > $("#content").height($("#dialog").height()-220); > $("#content").width($("#dialog").width()); > } ); > > <iframe id="content" src="working.do" style="margin-top: 0; margin- > bottom:0;position: absolute;"></iframe> > > Where #dialog is the dialog div tag. Now, the problem it seems is that > resizing is sticky. When I try to drag the edges of the dialog > windows, there is a lot of delay and it is jumpy. I am not sure if its > related to the iframe resize sticky issue. > > Jamie > > On Jan 15, 4:20 pm, Steven Black <ste...@stevenblack.com> wrote: > > > That's probably because Dialog adds a wrapper (the actual dialog) and > > siblings (the title bar and buttons) to the target div. In other > > words, your div becomes a child of the dialog. > > > So try binding the resize() of your content's parent() or, in your > > case, the iframe's grandparent assuming you have the simplest possible > > containership here. > > > **--** Steve > > > On Jan 15, 6:40 am, Jamie <jab...@mweb.co.za> wrote: > > > > Hi There > > > > I have a JQuery modal dialog whose purposes is to display an email. It > > > consists of header information, i.e. to, from, cc, subject, etc. > > > outputted as normal text. Below it, I have an iframe with the actual > > > content of the email dynamically loaded. This iframe is configured to > > > autoscroll. > > > > The problem is that when a user changes the size of the dialog by > > > dragging its outer edge, the iframe inside the dialog is not resized. > > > Thus, the mail content inside the iframe is cut off. > > > > What I really want is for the iframe to resize and the iframe's scroll > > > bar to reflect the new size of the iframe. Now, I've tried to hook > > > onto the dialog's resize event to potentially resize the iframe, but > > > the event never gets called. > > > > Any help to resolve this would be most appreciated. > > > > Jamie > >
-- You received this message because you are subscribed to the Google Groups "jQuery UI" group. To post to this group, send email to jquery...@googlegroups.com. To unsubscribe from this group, send email to jquery-ui+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/jquery-ui?hl=en.