WPSlash

Trigger AJAX Popup on the whole product element click

Thursday October 29, 2020

The following code snippet will make popup opening without having to click on the “Select” button, will actually make the whole product wrapper clickable.

Copy and paste the following code to your functions.php under your child theme

add_action("wp_footer", "wpslash_woofood_hook_trigger_click_wrapper");

function wpslash_woofood_hook_trigger_click_wrapper()
{
    ?>

    <script type="text/javascript">
        

        jQuery(document).ready(function()

        {

                  jQuery(document).on('click', '.woofood-product-loop' , function(e)
                  { 
                    jQuery(this).find('.woofood-quickview-button').trigger('click');


                  });




        });
    </script>
    <?php
}

Leave a Comment

Your email address will not be published. Required fields are marked *

×

🔥 ONE DAY ONLY OFFER 🔥

Upgrade FoodMaster Today

Normally your license is limited to 1 Website.

Today only, get a LIFETIME Unlimited Websites License for just:
$499

✔ Unlimited Client Websites
✔ Unlimited Personal Projects
✔ Future Updates Included
✔ Save Hundreds on Additional Licenses

Offer Ends In: