Closed this code in frontend.js and everything worked out
$(document).on(‘click’, ‘.add_to_cart_button’, function () {
var cart = $(‘body’).find(‘.majc-toggle-open-btn’);
var imgtodrag = $(this).closest(‘.product’).find(“img”).eq(0);
if (imgtodrag.length) {
var imgclone = imgtodrag.clone()
.offset({
top: imgtodrag.offset().top,
left: imgtodrag.offset().left
})
.css({
‘opacity’: ‘0.8’,
‘position’: ‘absolute’,
‘height’: ‘150px’,
‘width’: ‘150px’,
‘z-index’: ‘100’
})
.appendTo($(‘body’))
.animate({
‘top’: cart.offset().top + 10,
‘left’: cart.offset().left + 10,
‘width’: 75,
‘height’: 75
}, 1000);
setTimeout(function () {
cart.effect(“shake”, {
times: 2,
distance: 150
}, 200);
}, 1500);
imgclone.animate({
‘width’: 0,
‘height’: 0
}, function () {
$(this).detach()
});
}
});