Shiva Bhusal
Shiva's Blog

Follow

Shiva's Blog

Follow

Accessing elements outside of iFrame using jQuery

Shiva Bhusal's photo
Shiva Bhusal
·Sep 30, 2014·

1 min read

Play this article
// window.parent gives you access to the Parent document of iFrame
// This code is supposed to be accessed inside of iframe//

$('#close-button').click(function () {
    window.parent.$('#new_button').magnificPopup('close');
 });
 
Share this