IS there anyway to add a class to the href of a button element rather than the button itself . I need to add the class so that it will initiate some javascript on click but adding a class to the button seems to add it to the button itself rather than the inside the button
Hi Lekan,
I just tried and adding a class to classic button or V2 button elements will add it to the href tag.


You can verify if your class has been added using google inspect element.
Hope that helps.
1 Like
Awesome, thanks, indeed it was putting it on the tag , my issue was other script tags had added the JS twice on same page! All sorted, thanks for your pointers
Glad it’s okay now and you’re most welcome!
This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.