Created
June 12, 2025 15:03
-
-
Save xlplugins/3a3f46f6d1ebb507aa43b0626397cbba to your computer and use it in GitHub Desktop.
Disable Animation on Slide cart during add to cart and click on ICON
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_filter('fkcart_re_run_get_slide_cart_ajax','__return_false',99); | |
add_action( 'wp_footer', function () { | |
?> | |
<style> | |
.fkcart-drawer-container { | |
transform: translate(0px) !important; | |
} | |
</style> | |
<script> | |
(function () { | |
$ = jQuery; | |
$(document.body).on('fkcart_cart_closed', function (params) { | |
$('#fkcart-modal').css('display', 'none'); | |
$('#fkcart-modal').slideUp(); | |
$('.fkcart-drawer-container').css('transform', 'translate(100%)'); | |
}); | |
$(document.body).on('click', '#fkcart-floating-toggler, .fkcart-slider-toggle, a.btn.btn--primary', function (params) { | |
console.log('down'); | |
let html = $('html'); | |
if (html.hasClass('fkcart-trigger-open')) { | |
return; | |
} | |
html.addClass('fkcart-trigger-open'); | |
$('.fkcart-drawer-container').css('transform', 'translate(0px)'); | |
$('#fkcart-modal').addClass('fkcart-show').show(); | |
}); | |
$(document).ajaxComplete(function (event, jqxhr, settings) { | |
//fkcart-modal-container | |
if (settings.url.indexOf("wc-ajax=fkcart") > -1) { | |
$('.fkcart-drawer-container').css('transform', 'translate(0px)'); | |
$('#fkcart-modal').addClass('fkcart-show').show(); | |
} | |
}) | |
})(jQuery) | |
</script> | |
<?php | |
}, 200 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment