- TLC Home Home
- Discussions Discussions
- Documentation Documentation
- Knowledge Base Knowledge Base
- Education Education
- Blog Blog
- Support Desk Support Desk
02-26-2019 08:19 AM
I want to track clicks on a specific button that can be found on several pages. The corresponding jQuery selector is something like:
At the end of the string there is a number ## which differs across pages.
Can I use the jQuery onHandler extension and use a wildcard in the jQuery selector (something like button.btn....^) to track the clicks?
Solved! Go to Solution.
02-27-2019 06:00 PM
You can use CSS selectors to filter attributes, as described here: https://developer.mozilla.org/en-US/docs/Web/CSS/Attribute_selectors
In your case, let us take the example class assigned to the button "button btn_12"
You could try using something like this which checks if it has the class "button" and has a class containing "btn_"
Hope that helps!
02-27-2019 11:16 PM
03-06-2019 06:01 AM
Copyright All Rights Reserved © 2008-2023