Skip to content Skip to sidebar Skip to footer

Hide Elements In An Iframe From The Parent When The Iframe Has No Id

The url is http://oxfordgenetics.com/plasmid-builder and the iframe comes from the 'product details' link on each builder group. What I need to do is hide some of the elements in t

Solution 1:

You know the iframe will be in the shadowbox, which has an id of sbox-content. So this should work:

var$iframe = jQuery('#sbox-content iframe')

Solution 2:

I got around it by having the code below test if it was a 'modal' box or not with an arbitrary ID that was only in the 'modal' window:

var element = document.getElementById('system-message-container'); 
if (typeof(element) != 'undefined' && element != null)
{
       document.getElementById('cartarea').style.display='none';
}

Post a Comment for "Hide Elements In An Iframe From The Parent When The Iframe Has No Id"