javascript - Magnific Popup video iframe callback (load complete) -


i use magnific popup codeactually , want find way know when current iframe load complete. can me please?

i build gallery of video :

$('.contentlist').magnificpopup({     delegate: 'a',     type: 'iframe',     tloading: 'loading image #%curr%...',     mainclass: 'mfp-fade',     removaldelay: 160,     preloader: true,     preload:0,     fixedcontentpos: false,     closemarkup: "<button title=\"%title%\" type=\"button\" class=\"mfp-close\">back<\/button>",     gallery: {       enabled: true     },     iframe: {       markup: '<div class="mfp-iframe-scaler">' +       '<div class="mfp-counter"></div>' +       '<div class="mfp-title">some caption</div>' +       '<div class="wrapper">' +       '<iframe class="mfp-iframe" frameborder="0" allowfullscreen></iframe>' +       '</div>' +       '<div class="mfp-caption">some caption</div>' +       '<div class="mfp-close"></div>' +       '</div>',       srcaction: 'iframe_src',     }, callbacks: {   markupparse: function (template, values, item) {     values.title = item.el.attr('title');     values.caption = item.el.attr('data-caption');     videodescription = item.el.data('description');      $('.mfp-iframe').load(function () {       $('.mfp-iframe').contents().find('video').attr('data-description', videodescription);     });     // iframe not load anyway can't find video    },     elementparse: function(item) {     $('.mfp-iframe').load(function () {       $('.mfp-iframe').contents().find('video').attr('data-description', videodescription);     });     // iframe load each element   },   afterappend: function(){     console.log("appended");     $('.mfp-iframe').load(function () {       $('.mfp-iframe').contents().find('video').attr('data-description', videodescription);     });     // iframe not load anyway can't find video   },   updatestatus: function(data) {     console.log('status changed'+data.status);     $('.mfp-iframe').load(function () {       $('.mfp-iframe').contents().find('video').attr('data-description', videodescription);     });     // iframe not load anyway can't find video   },  }   }); 


Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

performance - Why is XCHG reg, reg a 3 micro-op instruction on modern Intel architectures? -

jquery - Responsive Navbar with Sub Navbar -