Right now, I have a video set up within an iFrame via jQuery UI. In Firefox I have no problems, but for IE and Chrome, the audio continues despite closing the pop-up dialog.
Is there a way around this in the jQuery UI code?
Thanks.
<script type="text/javascript">
function openDialog(url) {
$("<div class='popupDialog'>Loading...</div>")
.dialog({
autoOpen: true,
closeOnEscape: true,
width: '900',
height: '900',
modal: true,
title: 'Bonus Features'
}).bind('dialogclose', function() {
jdialog.dialog('destroy');
}).load(url, function() {
$(this).dialog("option", "position", ['center', 'center'] );
});
adjustJQueryDialogOverlay();
}
$(window).resize(function() {
$(".ui-dialog-content").dialog("option", "position", ['center', 'center']);
});
</script>
Add a
beforeCloseto the dialog to remove the element: