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 *

Related Articles

Tutorials

How to Set Up SMS and WhatsApp Order Notifications for Your WooCommerce Restaurant (2025)

Why SMS and WhatsApp Notifications Matter for Restaurant Orders A customer places an order on your <a href="https://www.wpslash.com/how-to-set-up-real-time-order-tracking-for-your-woocommerce-restaurant-website-2025-2/" title="How to Set Up Real-Time Order Tracking for Your <a href="https://www.wpslash.com/how-to-set-up-catering-and-large-group-orders-on-your-woocommerce-restaurant-website-2025/" title="How to Set Up Catering and Large Group Orders on Your WooCommerce Restaurant Website (2025)”>WooCommerce Restaurant Website (2025)”>restaurant website at 7:15 PM during the Friday rush. […]
May 3, 2026
Tutorials

How to Set Up Real-Time Order Tracking for Your WooCommerce Restaurant Website (2025)

Why Real-Time Order Tracking Matters for Restaurant Websites Picture this: a hungry customer places an order on your <a href="https://www.wpslash.com/how-to-build-a-customer-loyalty-program-for-your-wordpress-restaurant-website-2025/" title="How to Build a Customer Loyalty Program for Your <a href="https://www.wpslash.com/how-to-connect-your-wordpress-restaurant-website-to-doordash-uber-eats-grubhub-2025/" title="How to Connect Your WordPress <a href="https://www.wpslash.com/how-to-rank-your-restaurant-website-on-google-local-seo-for-wordpress-2025/" title="How to Rank Your Restaurant Website on Google: Local SEO for WordPress (2025)”>Restaurant Website to DoorDash, Uber […]
May 3, 2026
Tutorials

How to Set Up Catering and Large Group Orders on Your WooCommerce Restaurant Website (2025)

Why Catering and Large Group Orders Matter for Restaurant Revenue Most restaurant owners pour energy into optimizing their dine-in experience and individual delivery orders while overlooking a revenue channel that can transform their bottom line: catering. A single corporate lunch order for 30 people can equal what your dining room generates in an entire slow […]
May 2, 2026