Last active
April 23, 2024 13:05
-
-
Save xlplugins/fbda67d868e4a27b49e7b72f149628a4 to your computer and use it in GitHub Desktop.
update side cart at page load #side cart
This file contains 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
// Paste your JS code here, don't include script tags<script> | |
window.addEventListener('load', function () { | |
(function ($) { | |
$('body .cart-trigger').click(function(){ | |
$('body').trigger('fkcart_open'); | |
$('.oxy-off-canvas').css('display','none') | |
}); | |
setTimeout(($) => { | |
if ($ == undefined) { | |
console.log('jQuery not found'); | |
return; | |
} | |
$('body').trigger('fkcart_update_side_cart', [false]); | |
}, 1500, $) | |
})(jQuery); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment