Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $( document ).ready(function() {
- const wishlistDiv = $("a[href='/wishlist']").eq(0);
- if(Number($('[data-wc="wl_count"]')[0].innerText) === 0) {
- $('[data-wc="wl_count"]').eq(0).hide();
- }
- $(".action.wishlst").on("click", function(e) {
- console.log("wishlist clicked");
- const wishlistCount = $('[data-wc="wl_count"]').eq(0);
- setTimeout(() => {
- let count = $('[data-wc="wl_count"]')[0].innerText;
- console.log("count is", count);
- if(count > 0) {
- wishlistCount.show();
- } else {
- wishlistCount.hide();
- }
- }, 2500)
- });
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement