Landing collected on the designer. Through the insertion of the html code I prescribe an iframe without attributes, only the variable name. With standard constructor tools, when you click on a link, video from a third-party resource is launched in the iframe. The task - after playing the video to give the user the opportunity to close the iframe window. In those support, they wrote what can be done by installing the window closing script. Tell me, pliz, what is there to write

    1 answer 1

    Like that:

    function closeIFrame(){ $('#youriframeid').remove(); } 

    According to @Mikl's advice, if the frame is still to be used in the future, then you need to use the hide() method:

     $('#youriframeid').hide(); 
    • I think it will be enough just $('#youriframeid').hide(); All of a sudden this iframe will be used again. - Mikl
    • @Mikl, yes, as an option. - Ilya Bizunov
    • display: none; really help. But what to do if somewhere a script is spinning that works with this element? You must first stop him, but you will catch a bunch of mistakes. - user207618
    • Thank you, colleagues! I went to try - Cyril