I am trying to use jQuery dialog with YouTube video.
Code for jQuery:
var template = $(document.createElement('div')).attr('class', 'sample').attr('id', 'sample').text('Hello World'); $('body').append(template); $(template).dialog({ autoOpen: false, height: 280, width: 600, modal: true, resizable: false, open: function (){}, close: function () {}, buttons: {} });
Code for YouTube:
<iframe title="Video" width="640" height="390" src="http://www.youtube.com/embed/gVjqL-9Fh3E" frameborder="0" allowfullscreen></iframe>
The video is already on the page. There is a button on the page. After clicking the button, the dialog opens above. So the problem is when the dialog box opens, the dialog is behind the video. I tried a search on Google, there is a solution for a similar problem when the video is embedded using Object and embed, but nothing is used when the iframe is used. Any guidance from people on what can be done to solve this problem?
source share