About This Ticket

Magnific popup (iframe)

by marko227 / September 15, 2015, 5:46 pm

Hello,

First thank you for this awesome template and thank you for updating template with image popup option.

 

Asi can see, template use magnific popup script which support youtube also.

I try do this by myself but no success.

 

In main.js i add this

$(document).ready(function() {
	$('.popup-youtube, .popup-vimeo, .popup-gmaps').magnificPopup({
		disableOn: 700,
		type: 'iframe',
		mainClass: 'mfp-fade',
		removalDelay: 160,
		preloader: false,

		fixedContentPos: false
	});
});

In css i add this

.mfp-fade.mfp-bg {
	opacity: 0;
	-webkit-transition: all 0.15s ease-out; 
	-moz-transition: all 0.15s ease-out; 
	transition: all 0.15s ease-out;
}
.mfp-fade.mfp-bg.mfp-ready {
	opacity: 0.8;
}
.mfp-fade.mfp-bg.mfp-removing {
	opacity: 0;
}

.mfp-fade.mfp-wrap .mfp-content {
	opacity: 0;
	-webkit-transition: all 0.15s ease-out; 
	-moz-transition: all 0.15s ease-out; 
	transition: all 0.15s ease-out;
}
.mfp-fade.mfp-wrap.mfp-ready .mfp-content {
	opacity: 1;
}
.mfp-fade.mfp-wrap.mfp-removing .mfp-content {
	opacity: 0;
}

And in html i add this

<a class=”popup-youtube” href=”http://www.youtube.com/watch?v=0O2aH4XLbto”>Open video</a>

When i click to open video, there is only black popup vindow without video…

 

Can you help me with this?

Thank you,

Marko!
 

Staff

Hello,

We've edited your code to remove the purchase code.

Also, we checked your code for issue, but was unable to find it. 

We tried running your code, and it works just fine. https://jsbin.com/lubudahumi/edit?html,output

Please check your html / js for any typo. Also, share your website URL so that we can check for any issue.

If you like our theme, please review us at themeforest with 5 stars.

Thanks,

0effortthemes