Open craigphiz opened 9 years ago
Trying to load in a vimeo video and getting the exact same error.
Found a solution by adding this:
$(document).on('ready pjax:end pjax:popstate', function(e) {
// Lightbox
(function($) {
'use strict';
if ($.isFunction($.fn['themePluginLightbox'])) {
$(function() {
$('[data-plugin-lightbox]:not(.manual), .lightbox:not(.manual)').each(function() {
var $this = $(this),
opts;
var pluginOptions = $this.data('plugin-options');
if (pluginOptions)
opts = pluginOptions;
$this.themePluginLightbox(opts);
});
});
}
}).apply(this, [jQuery]);
});
Hope this helps you too :)
I'm using magnific in the html like this:
It's working great apart from when the html is partially loaded using jquery.pjax. In this case, when the image is clicked a console error
is thrown.
Is anyone else seeing this? Have a workaround/fix? Any help gratefully received!