Modal box over iframe visibility
I have an html page which contains iframe from another site.开发者_JAVA百科 Left from iframe i have a link that opens modal box with video from Vimeo.com. Problem is when I click and open modal box, modal window is cut by iframe. In some browsers only edges of modal window are being cut, and in some whole embedded video.
I'm using http://colorpowered.com/colorbox/, based on jQuery. I tried to change "wmode" attributes for both iframe and modal box videos, played with z-index but it won't do the magic.
Unfortunately, the dialog of jQuery is bound by the page itself. I don't know how savvy your jQuery skills are, but one possible solution (albeit hacky) could be to extract the div which is used as the dialog on that site and append it to the body of the page which uses the iframe.
$('body').prepend($('div').detach();
Not sure if that would fix it, but you could try. If nothing happens, you might need to rewire the button to execute the exact same javascript except on your page not the one included in the iframe (include the javascript directly from the page itself rather than copy it locally ). If all goes well, you can get the dialog to work without having to write the damn thing yourself.
OK i fixed it. Thanks for response, but after a while i wrapped wrapper div from color box into Iframe and that fixed things. I still had to specify "wmode" attributes in flash tags.
精彩评论