Last active
June 11, 2025 08:30
-
-
Save xlplugins/0e2075a646128cf6156668a82683d42b to your computer and use it in GitHub Desktop.
open fast slide cart using customerscript
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_action( 'wp_footer', function () { | |
?> | |
<script> | |
(function () { | |
$ = jQuery; | |
$(document.body).on('fkcart_cart_closed', function (params) { | |
console.log('update') | |
$('#fkcart-modal').slideUp() | |
}); | |
$(document.body).on('click', '#fkcart-floating-toggler, .fkcart-slider-toggle', function (params) { | |
console.log('down'); | |
let html = $('html'); | |
if (html.hasClass('fkcart-trigger-open')) { | |
return; | |
} | |
html.addClass('fkcart-trigger-open'); | |
$('#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