Hello Guys, I have a time sensitive issue here for a client. I think I have a quick fix but don't know how to add the code it.
I have a modal window with a youtube video which uses youtubes iframe embed method. Ok, when you close the modal box, the audio can still be heard in some versions of internet explorer.
my idea is that upon clicking close, have jquery change the iframe source to any old website url (google or whatever. doesnt matter really) instead of youtube path so it will kill the sound out. would that work?
I guess ill need to give the iframe a
name and then code in the instructions somehow. can anybody help me code it to
this is my html snippet
Code:
<div id="boxes2">
<div id="dialog2" class="window">
<div id="closeout2"><a href="#">X</a></div>
<div id="popuptop2">my video title</div>
<iframe width="640" height="360" margin-left="auto" src="http://www.youtube.com/embed/myactualvideopath" frameborder="0" allowfullscreen></iframe>
</div>
<div id="mask"></div>
</div>
this is my jquery snippet for the closeout functions:
Code:
//if close button is clicked
$('.window #closeout2').click(function (e) {
//Cancel the link behavior
e.preventDefault();
$('#mask').hide();
$('.window').hide();
});
Any help would be great.