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.

有帮助吗?

解决方案 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';
}

其他提示

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')
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top