Pregunta

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.

¿Fue útil?

Solución 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';
}

Otros consejos

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')
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top