var tag = document.createElement('script'); tag.src = "https://www.youtube.com/iframe_api"; var firstScriptTag = document.getElementsByTagName('script')[0]; firstScriptTag.parentNode.insertBefore(tag, firstScriptTag); // Variables of the divs (where the YouTube iframe will load): var loadYT; var multip; function onYouTubeIframeAPIReady() { // Div player: loadYT = new YT.Player('loadYT',