Title: Trigger yith quick view
Last modified: November 11, 2020

---

# Trigger yith quick view

 *  [melania525](https://wordpress.org/support/users/melania525/)
 * (@melania525)
 * [5 years, 6 months ago](https://wordpress.org/support/topic/trigger-yith-quick-view/)
 * hi i try to trigger yith quick view button by this code
 *     ```
       add_action("wp_footer", "trigger_click_wrapper");
   
       function trigger_click_wrapper()
       {
           ?>
   
           <script type="text/javascript">
   
   
               jQuery(document).ready(function()
   
               {
   
                         jQuery(document).on('click', '.product-content' , function(e)
                         { 
                           jQuery(this).find('.what to add here?').trigger('click');
   
                         });
   
               });
           </script>
           <?php
       }
       ```
   
 * I tried many classes without affect.
    What class should i add for trigger your
   plugin?
 * Thanks a lot

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Author [YITHEMES](https://wordpress.org/support/users/yithemes/)
 * (@yithemes)
 * [5 years, 6 months ago](https://wordpress.org/support/topic/trigger-yith-quick-view/#post-13657674)
 * Hi,
    and thank you for writing in!
 * The Quick View button class is `yith-wcqv-button`, so you could use the `.yith-
   wcqv-button` selector.
    Please try adding the following code snippet to your 
   theme **functions.php**
 *     ```
       if ( !function_exists( 'yith_wcqv_customization_trigger_quick_view_on_product_click' ) ) {
       	add_action( 'wp_enqueue_scripts', 'yith_wcqv_customization_trigger_quick_view_on_product_click', 99 );
       	function yith_wcqv_customization_trigger_quick_view_on_product_click() {
   
       		$js = "( function( $ ){
       				$( document ).on( 'click', '.product-content', function (e) {
       					e.preventDefault();
   
       					var btn = $(this).find( '.yith-wcqv-button' );
       					if ( !btn.length ){
       						btn = $(this).closest( '.product' ).find( '.yith-wcqv-button' );
       					}
   
       					if ( !btn.length ){
       						return;
       					}
   
       					btn.trigger( 'click' );
       				});
               } )( jQuery );";
       		wp_add_inline_script( 'yith-wcqv-frontend', $js );
       	}
       }
       ```
   
 * and let us know if this will do the trick!
 *  Thread Starter [melania525](https://wordpress.org/support/users/melania525/)
 * (@melania525)
 * [5 years, 6 months ago](https://wordpress.org/support/topic/trigger-yith-quick-view/#post-13657737)
 * Hi and thanks for your reply. I added this but on click it doesnt do anything
   and i get a high server load. I work on deticated server

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Trigger yith quick view’ is closed to new replies.

 * ![](https://ps.w.org/yith-woocommerce-quick-view/assets/icon-128x128.gif?rev=
   3193930)
 * [YITH WooCommerce Quick View](https://wordpress.org/plugins/yith-woocommerce-quick-view/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/yith-woocommerce-quick-view/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/yith-woocommerce-quick-view/)
 * [Active Topics](https://wordpress.org/support/plugin/yith-woocommerce-quick-view/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/yith-woocommerce-quick-view/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/yith-woocommerce-quick-view/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [melania525](https://wordpress.org/support/users/melania525/)
 * Last activity: [5 years, 6 months ago](https://wordpress.org/support/topic/trigger-yith-quick-view/#post-13657737)
 * Status: not resolved