e1commerce.com
Ask a question
  • New questions
  • With the answers
  • Unanswered
  1. Home
  2. javascript - Magnific Popup interfering with my Ajax cart slider, my coding won't work

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
2022-12-3


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.

Ask a Question

Similar questions

Find the answer in similar questions on our website.

200 I make shopify 'limit cart quantity' public app but when add new product in cart, not check condition . when i refresh page then work proper
506 javascript - Magnific Popup interfering with my Ajax cart slider, my coding won't work
191 javascript - How to add custom textbox field on shopify product page that also shown in cart under product description
923 javascript - Date picker field in the cartpage gets auto-populated with the last date of the allowed two-month calendar
589 Shopify, Liquid, Alpine JS, Ajax can't redirect to cart after firing addToCart
237 javascript - Slick Slider doesn't work with shopify dawn's product recommendation section
382 javascript - Redirect customer to the different page after submitting for account creation error
665 javascript - Shopify validation for custom attribute fields in cart page
512 javascript - Ajax and Jquery trying to get form to submit without refreshing page or url update (SHOPIFY)
5 node.js - Heroku: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory even after changing NODE OPTIONS

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.







Latest questions:

58 Triggering Zapier on new Shopify order containing a specific product

411 javascript - Swiper js - How can i change the background color of the selected slide

711 Shopify Webhooks not redirect into Laravel Route

908 How to enable / disable my app that is being managed from theme customization section shopify

162 Shopify List Blog Tags



© 2021

E-mail: infot@e1commerce.com