jQuery - Close iFrame Popup from within (close parent from within child) -
/ P>
& lt; Div id = "iframe popup" & gt; & Lt; Div class = "content" & gt; & Lt; / Div & gt; & Lt; / Div & gt; & Lt; Button id = "popit" & gt; Show & lt; / Button & gt; JQuery ('# iframePopup'). BPopup ({content: 'jquery' ('# popIt'). Iframe ', contentcontainer:'. Content ', loadUrl:' http: //www.site-url.com ', Opacity: 0.4, iframeAttr :(' scrolling = "Yes" '}});});
It works fine, but if I click on a particular button in the IFrame, then it should be able to close the popup.
Close popup with Bipop Docs / API State I:
jQuery ('# close-btn'). Click (function () {var bPopup = jQuery ('# iframePopup'). BPopup (); bPopup.close ();});
But this only works when the button is on the HTML page, not in the iframe. How can I target #iframePopup
from within the iframe?
Comments
Post a Comment