开发者

Center Fancybox within Iframe to the Parent's center

  • I've searched on here but it seems there was no question like this before.

I have an iframe in a page. On the iframe, there is fancybox popup. But fancybox centers itself based on the iframe dimension, not the paren开发者_Go百科t dimension. Can i make the fancybox to center by the parent's dimension?

For example please check this url http://www.xrvel.com/sub/q/

And click the "Click me" link, and the fancybox will be centered on the center of the iframe document..


You can use .contents() method to get access to iframe content. Also you should prepare fancybox in the parent document. After clicking on the link in iframe, you can load into your fancybox any content from iframe's link.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜