Toggle Ajax shopping cart widget
-
I have some custom add to cart buttons I would like to toggle the ajax shopping cart widget when clicked. Can you give me a javascript code to toggle the widget?
Thanking you in advance.
Hello,
Our shopping cart widget is shown after add to cart even so you need to trigger this event with the following JS code
jQuery('body').trigger('added_to_cart');
Kind Regards
Thank you very much! This works great.. Could you provide the callback() for add to cart?
Sorry, what callback do you mean?
Sorry, I am a beginner at Javascript and PHP but im trying to learn. I thought maybe you had a callback set up to add products to cart via ajax without page reload. Anyways, I figured out how to add the product to cart by inspecting the add to cart buttons on the page already. Everything is working great now =) Thank you for the help!! Great Theme and support! A+
Great, you are welcome! Feel free to contact us if you will have any questions.