- TLC Home Home
- Discussions & Ideas Discussions & Ideas
- Product Guides Product Guides
- Knowledge Base Knowledge Base
- Developer Docs Developer Docs
- Education Education
- Blog TLC Blog
- Support Desk Support Desk
Hi Everyone,
My website is design in ember, so it's id keeps on changing everytime we refresh the page and all the button across site has same class name. So while making extension i am facing problem as that jQuery selector fires everywhere that button is present. I am not able to narrow down to particular button. Attaching screenshot of the extension and my website code.
Extension:
Website Code:
What approach should be used here. So that my extension runs properly on click of particular button only.
05-21-2019 12:25 PM - edited 05-21-2019 12:26 PM
If you are trying to traget a button which is present only on a single page then can you try using a URL check condition before triggering the utag.view call in custom code.
if (document.URL.toString().toLowerCase().indexOf('URL GOES HERE') > -1) { utag.view({ 'form_error': 'This field is required' }) }
Hope this helps.
Thanks
Copyright All Rights Reserved © 2008-2021