• Resolved frankie.yuen

    (@frankieyuen)


    Hi,

    Great plugin!

    I am using
    Advanced AJAX Product Filters for WooCommerce
    and
    WooCommerce Load More Products

    in my site together with your plugin.

    The problem is that the heart icon will not show when you scroll down with the ajax load product.

    My guess is that the heart icon is added with a JavaScript and it will not load ‘again’ when the ajax is executed, hence no heart icon shown.

    In fact above two plugins allow me to put a JavaSctipt to run after update. But I am not familiar with your plugin/ code, so I cannot add that to make the heart icon showing up. Can you please point me to the right direction?

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Pablo Pacheco

    (@karzin)

    Hi,
    Thanks ??

    Please try this code on your functions.php

    add_action('wp_footer',function(){
        ?>
        <script>
            jQuery(document).on('berocket_ajax_products_infinite_loaded',function(){
    			jQuery('.alg-wc-wl-btn').addClass('ajax-loading');
    			var alg_wc_wl_show = function(){
    				jQuery('.alg-wc-wl-btn.ajax-loading').removeClass('ajax-loading');
    			}
    			var alg_wc_wl_position = function(){				
    				if (typeof alg_wc_wl_thumb_btn_positioner === 'undefined' || jQuery.isEmptyObject(alg_wc_wl_thumb_btn_positioner)) {
    					jQuery('body').on('alg_wc_wl_thumb_btn_positioner', function (e) {
    						alg_wc_wl_thumb_btn_positioner = e.obj;
    						alg_wc_wl_thumb_btn_positioner.init();					
    					});
    				} else {
    					alg_wc_wl_thumb_btn_positioner.init();
    				}
    				setTimeout(alg_wc_wl_show, 200);
    			};
    			setTimeout(alg_wc_wl_position, 500);
            });
        </script>
        <?php
    });
    Thread Starter frankie.yuen

    (@frankieyuen)

    Works well, thanks!

    Plugin Author Pablo Pacheco

    (@karzin)

    ??

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Heart Icon not showing after an ajax load’ is closed to new replies.