Frage

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 the shadowbox that appears when this link is clicked.

I have tried all of the usual remedies (both jQuery and js) without success as most of them latch onto the iframe using its ID which doesn't exist here.

Same domain of course.

War es hilfreich?

Lösung 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';
}

Andere Tipps

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')
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top