How to resize elements inside iFrame with jQuery resizable?

I'm having some problems with a project I'm currently involved with. Here is my situation. I am dynamically building and rendering a web page to an iframe, and I am wanting to offer the user the ability to resize the div elements within that rendered page in the iframe. To setup the context, consider the following snippets: Host Page:
Rendered Page:

Header

Body

Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Mauris et sapien ligula, sit amet tincidunt ligula.

Footer Div
So, what the host page is trying to do is reach into the rendered page and allow the 'test-resize' element to be resized. What I find puzzling is that the resizable plugin finds the 'test-resize' element and then adds the necessary resize handle divs and fires the 'create' event. However, when attempting to actually resize, nothing happens. Nothing changes, and no event fires. With that, my question is, how can I (if at all) reach into an iframe and resize an element? Please note that these two pages are on the same domain. Edit: I guess I should clarify another point. When adding the resize code to the generated page, the resize works fine, but I was wanting to keep the code at the host page level.

以上就是How to resize elements inside iFrame with jQuery resizable?的详细内容,更多请关注web前端其它相关文章!

赞(0) 打赏
未经允许不得转载:web前端首页 » jQuery 答疑

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

前端开发相关广告投放 更专业 更精准

联系我们

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏