6

I am trying to move the contents of one div and append it to another div. The div that I am moving includes a embedded youtube iframe. When I try clicking on the full screen button after the div has been moved, the video resets instead of continuing playback in full screen. The same issue happens if I move the iframe itself to another location.

Here's an example:

$(iframes).each(function() {
    $('.tab_content').append($(this));
});

After moving the embedded iframes, in Windows 8 IE10, I can't view the video in full screen.

Reloading the iframe also doesn't seem to be fixing the bug:

$('iframe').each(function() {
    var src = $(this).attr('src');
    $(this).attr('src', '');
    $(this).attr('src', src);
});
4

2 に答える 2

4

この方法を使用できます。

$('iframe').each(function() {
    $('.tab_content').append($(this).prop('outerHTML'));
    $(this).remove();
});

乾杯!

于 2013-10-09T03:54:01.657 に答える
0

iframe のクローンを作成するとどうなりますか?

$(iframes).each(function() {
    $('.tab_content').append($(this).clone());
});
于 2013-10-03T20:11:21.093 に答える