私はこのDIVを持っています:
<div id="video_container" class="barra">
<ul>
<li><iframe width="450" height="253" src="//www.youtube.com/embed/Gy3lrgVakII" frameborder="0" allowfullscreen></iframe></li>
<li><iframe width="450" height="253" src="//www.youtube.com/embed/AnwKqlhzCM4" frameborder="0" allowfullscreen></iframe></li>
<li><iframe width="450" height="253" src="//www.youtube.com/embed/wLJM0oi7o9A" frameborder="0" allowfullscreen></iframe></li>
<li><iframe width="450" height="253" src="//www.youtube.com/embed/NRWrYGaqIO8" frameborder="0" allowfullscreen></iframe></li>
<li><iframe width="450" height="253" src="//www.youtube.com/embed/ICUhpeXDrwQ" frameborder="0" allowfullscreen></iframe></li>
<li><iframe width="450" height="253" src="//www.youtube.com/embed/DDVWXbVxIkI" frameborder="0" allowfullscreen></iframe></li>
<li><iframe width="450" height="253" src="//www.youtube.com/embed/ntD69DBs8Q8" frameborder="0" allowfullscreen></iframe></li>
<li><iframe width="450" height="253" src="//www.youtube.com/embed/fuTmK5WHQ18" frameborder="0" allowfullscreen></iframe></li>
<li><iframe width="450" height="253" src="//www.youtube.com/embed/IpUwiyID_Kk" frameborder="0" allowfullscreen></iframe></li>
<li><iframe width="450" height="253" src="//www.youtube.com/embed/snISa71nM_k" frameborder="0" allowfullscreen></iframe></li>
<li><iframe width="450" height="253" src="//www.youtube.com/embed/z6VuNTPuChc" frameborder="0" allowfullscreen></iframe></li>
<li><iframe width="450" height="253" src="//www.youtube.com/embed/NKzwcbidanM" frameborder="0" allowfullscreen></iframe></li>
</ul>
</div>
<div id="video_container_mobile"></div>
同じコンテンツを別の div に入力したい(<ul>...</ul> )
私はこれを持っています:
var list = $("#video_container_mobile").append('<ul></ul>').find('ul');
$("#video_container ul li").each(function() {
var el = $(this);
list.append(el);
});
これは機能しますが、元の div からの消去、追加していたリストです。
以下の画像を参照してください。
Fiddle を参照してください。
2 つの DIV の同じコンテンツを維持したいのですが... 誰か助けてくれますか?