I want to get data from one div and insert the data to a new div using data attribute.
//get data from old div as JSON
var data = JSON.parse(document.getElementById('video_data').getAttribute('data-video'));
This is the div from where I get data.

//insert the data to the new div
document.getElementById('i').insertAdjacentHTML('afterbegin', '<div class="video_wrap update" video_name="' + data.video_name + '" data-video="' + JSON.stringify(data) + '"><div class="content"><div class="title_wrap infinite_wrap"><div class="quality uninfinite">∞</div></div><div class="img_wrap"><img src="https://i.ytimg.com/vi/' + data.yt_id + '/hqdefault.jpg"></div><div class="title_wrap"><div class="title">' + data.title + '</div></div></div></div>');
This is what I get after inserting the new div.

You can see that even the colour is not correct
What is the problem?