78 votes
0 answers
javascript - Magnific Popup interfering with my Ajax cart slider, my coding won't work
Solution:
Ok found solution if anyone needs it ever. Seems like you need to delay "close" function, otherwise it all "reveals" in one go. Basically this did the job:
$(document).ready(function() {
$('.imagepopup').magnificPopup({
callbacks: {
open: function(){
$('[data-href="#cart-notification"]').attr("aria-expanded","false");
},
close: function (){
setTimeout(function(){
$('[data-href="#cart-notification"]').attr("aria-expanded","true");
}, 500);
}
},
type:'image'});
});
Undefined asked
Source
Didn't find the answer?
Our community is visited by hundreds of Shopify development professionals every day. Ask your question and get a quick answer for free.
Similar questions
Find the answer in similar questions on our website.
Write quick answer
Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.