javascript - error on magnific popup youtube video on page load -


i'm finding difficult load youtube video using magnificpopup.

i not find solution on following reference: how load magnific popup on page load.

here's code:

$(document).ready(function(){     $.magnificpopup.open({     disableon: 700,     type: 'iframe',     removaldelay: 160,     preloader: true,     fixedcontentpos: false,      iframe: {         patterns: {             youtube: {                 index: 'https://youtube.com/',                  id: 'v=somevideo',                  src: 'http://www.youtube.com/embed/%id%?autoplay=1'              }         }     } }); });  

i need video load on page load. throws error stating:

uncaught typeerror: cannot read property 'parsed' of undefined 

why expect code in question work? in, makes think set of properties pass magnificpopup.open function?

i've had @ documentation/examples http://dimsemenov.com/plugins/magnific-popup/, , couldn't see example involved passing iframe property.

the example given youtube video attaches handlers href elements:

$(document).ready(function() {     $('.popup-youtube, .popup-vimeo, .popup-gmaps').magnificpopup({         disableon: 700,         type: 'iframe',         mainclass: 'mfp-fade',         removaldelay: 160,         preloader: false,          fixedcontentpos: false     }); }); 

(along styling options specify mfp-fade class should like). can see, you're calling method incorrectly.


Comments

Popular posts from this blog

c++ - QTextObjectInterface with Qml TextEdit (QQuickTextEdit) -

javascript - angular ng-required radio button not toggling required off in firefox 33, OK in chrome -

xcode - Swift Playground - Files are not readable -