dimsemenov / Magnific-Popup

Light and responsive lightbox script with focus on performance.
http://dimsemenov.com/plugins/magnific-popup/
MIT License
11.38k stars 3.49k forks source link

Woocommerce functions inside the pop up don't load properly #1093

Open atalosweb opened 5 years ago

atalosweb commented 5 years ago

I am using the plugin Feed them gallery which uses magnific pop up to show the images in pop up along with woocommerce options to buy a photo. However, when loading variables from woocommerce and then close the pop up, then page freezes like it's still trying to load woocommerce code even you have closed the pop up.
Problem should be here:

if(jQuery('.ft-gallery-variations-text').hasClass('ft-gallery-js-load')) { jQuery('.single_add_to_cart_button').addClass('disabled'); }

jQuery( ".ft-gallery-js-load" ).hover(function() { if(jQuery('.ft-gallery-variations-text').hasClass('ft-gallery-js-load')) { jQuery.getScript("/wp-content/plugins/woocommerce/assets/js/frontend/add-to-cart-variation.min.js"); jQuery('.ft-gallery-variations-text').removeClass('ft-gallery-js-load'); } });