jquery动态给子元素绑定事件,将元素内容添加到另一个元素中
$("#video_grid_box").on("dblclick",".miniStreamView",function($event){
for(let i=0;i<$("#video_grid_box").children().length;i++){
if($("#video_grid_box").children()[i].children.length==0){
$("#mainVideoView").children().appendTo($("#video_grid_box").children()[i])
}
}
var av = $(this).children();
console.log(av)
$("#mainVideoView").empty();
av.appendTo($("#mainVideoView"))
})
。

浙公网安备 33010602011771号