LOADING...

Preview

Pen ID
Unlock Campus Themeforest adv

 

Code
CSS
.video-panel {
		width: 700px;
		height: 300px;
		background: #000;
	}
		.video-panel iframe {
			width: 100%;
			height: 100%;
		}

		.video-list {
			margin-top: 20px;
		}
			.video {
				display: inline-block;
				margin: 0 5px;
				width: 100px;
				height: 100px;
				background: red;

			}
.play-button {
  width: 50px;
  height: 50px;
  background: blue;
  display: inline-block;
}
JS
jQuery('.video').hover(function() {
	if (jQuery('iframe').attr('src') != jQuery(this).data('video')) {
    var video = jQuery(this).data('video');
		jQuery('iframe').attr('src', video);
	}
});

jQuery('.play-button').click(function() {
  jQuery('.video-panel').find('iframe')[0].src += "?rel=0&autoplay=1";
});
Term
Wed, 12/27/2017 - 07:04

Related Codes

Pen ID
Pen ID
Pen ID
Square Adv