Title: Javascript click handler selector
Last modified: November 11, 2017

---

# Javascript click handler selector

 *  Resolved [Bojan121](https://wordpress.org/support/users/bojan121/)
 * (@bojan121)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/javascript-click-handler-selector/)
 * Great plugin, I’m using it on a highly customized shop and noticed that your 
   js click handler selector is targeting only buttons:
    `jQuery("button[class*=
   single_add_to_cart_button]")`
 * So, if the “add to cart” element is a `<a>` or `<input>` tag it won’t work. Can
   I make the suggestion of editing the selector so it listens to all clicks with
   that class regardless of the tag? It’s a simple fix, just remove the “button”
   in the selector so it looks like this:
    `jQuery("[class*=single_add_to_cart_button]")`
 * It’s a simple change that will make the plugin even more compatible with all 
   kind of customized shops, without causing problems for anyone.
 * Can you please add the change in the next version? Thanks.
    -  This topic was modified 8 years, 5 months ago by [Bojan121](https://wordpress.org/support/users/bojan121/).

Viewing 1 replies (of 1 total)

 *  Plugin Author [Conversios](https://wordpress.org/support/users/tatvic/)
 * (@tatvic)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/javascript-click-handler-selector/#post-9676394)
 * Hi,
 * Thank you so much for the valuable feedback! 🙂
 * We’ll surely look into this & make the suggested changes in the next release 
   of our plugin.
 * Happy Analyzing!
 * Thanks & Regards!

Viewing 1 replies (of 1 total)

The topic ‘Javascript click handler selector’ is closed to new replies.

 * ![](https://ps.w.org/enhanced-e-commerce-for-woocommerce-store/assets/icon-256x256.
   gif?rev=2708061)
 * [Conversios: Google Analytics (GA4), Google Ads, Conversion and Analytics Tracking for Multi-Channels](https://wordpress.org/plugins/enhanced-e-commerce-for-woocommerce-store/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/enhanced-e-commerce-for-woocommerce-store/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/enhanced-e-commerce-for-woocommerce-store/)
 * [Active Topics](https://wordpress.org/support/plugin/enhanced-e-commerce-for-woocommerce-store/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/enhanced-e-commerce-for-woocommerce-store/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/enhanced-e-commerce-for-woocommerce-store/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Conversios](https://wordpress.org/support/users/tatvic/)
 * Last activity: [8 years, 5 months ago](https://wordpress.org/support/topic/javascript-click-handler-selector/#post-9676394)
 * Status: resolved