display jQuery prettyPhoto lightbox in parent window from iframe -
I know that this issue has been discussed earlier but I can not seem to work for it. I have a master HTML page with IFrame. I am using jquery prettyphoto and I was wondering how can I display the light box in the original box when I click on the link in the iframe?
Master page:
& Lt; Title & gt; Master page & lt; / Title & gt; & Lt; / Head & gt; & Lt; Body & gt; & Lt; Iframe src = "iframe.html" width = "300" height = "300px" frameborder = "0" & gt; & Lt; / Iframe & gt; & Lt; / Body & gt; & Lt; / Html & gt;
Iframe page:
& Lt; Title & gt; Iframe & lt; / Title & gt; & Lt; Style type = "text / css" media = "screen" & gt; @import url ("property / css / infotech-iframes.css"); @ Import URL ("Asset / CSS / Infotech-Popup CSS"); & Lt; / Style & gt; & Lt; Script src = "property / js / jquery.js" type = "text / javascript" charset = "utf-8" & gt; & Lt; / Script & gt; & Lt; Script src = "property / js / jquery.popup.js" type = "text / javascript" charset = "utf-8" & gt; & Lt; / Script & gt; & Lt; / Head & gt; & Lt; Body & gt; & Lt; A href = "Property / Pictures / Screenshots / Campaign-Setup-LG. Png" rel = "BeautifulPhoto [Gallery]" & gt; & Lt; Img src = "property / picture / screenshot / campaign-setup-sm.gif" /> & Lt; / A & gt; & Lt; Script type = "text / javascript" charset = "UTF-8" & gt; $ (Document) .ready (function () {$ ("a [rel ^ = 'prettyPhoto'])) BeautifulPhoto ();}); & lt; / script & gt; & lt; / body & gt; & Lt Thanks for any help.
The Kabaddi answer is correct (please see the post for more details). However, to get access to the API in the parents of iFrame, you will have to add the following initialization code to the parent so that any of its work For
$. Fn.prettyPhoto ({Social_tools: false});
Comments
Post a Comment