I have a youtube video appear in the jquery dialog box, so if it is playing while the dialog window is closed, it will remain playing behind the scenes.
What I do as a result is destroy the window when it is closed:
$("#gallery_reel").dialog({
autoOpen: false,
width: 540,
close: function() {
$(this).dialog('destroy');
}
});
But once the dialog box is destroyed, it won’t open again unless I refresh the page. How do I reopen the dialog box?
I would SUGGEST just using the close function to STOP the youtube video, but if you insist on other, instead of destroy try the following: