I'm looking to destroy the magnificPopup handlers on my anchor tags as I have a filter that hides some and I'd like to re-add the handlers to just the ones that are visible, but in order to do that I need to remove it from the hidden ones.
close() method.$.fn.magnificPopup): to detach it all you need is to remove() the element, or unbind click event ($.fn.off('click.magnificpopup')) and optionally remove the stored options $.fn.removeData('magnificPopup').A refresh function on a container would be helpful:)
I could make the refresh (destroy and recreate) work only with setTimeout delay.
setTimeout(function() {
// Remove event and data (not sure about data)
$('a', $galleryContainer).off('click')
$('a', $galleryContainer).removeData('magnificPopup')
// Custom function to initiate MagnificPopup
initMagnificPopup($('.filtered a', $galleryContainer))
}, 500)
YO BRO!
Thanks @klihelp
very helpful
Most helpful comment
A refresh function on a container would be helpful:)
I could make the refresh (destroy and recreate) work only with setTimeout delay.