Data Element for Subclass

Avatar

Avatar
Level 1
Ocdobe
Level 1

Likes

0 likes

Total Posts

1 post

Correct reply

0 solutions
View profile

Avatar
Level 1
Ocdobe
Level 1

Likes

0 likes

Total Posts

1 post

Correct reply

0 solutions
View profile
Ocdobe
Level 1

08-03-2020

Hi there, 

I'm trying to capture the subclass of a html on a row of icons. What would the appropriate DOM attribute be to capture the value in bold red (def) when clicked?

div.buttons.mt-4.mx-auto.abc > div > div.abc.def

div.buttons.mt-4.mx-auto.abc > div > div.abc.ghi

div.buttons.mt-4.mx-auto.abc > div > div.abc.jkl

I've tried doing this previously, and I've managed two outcomes:

1) Captured only the parent class (abc)

2) Successfully capturing both class (abc def) but only the first value (abc def) even though I've clicked the subsequent icons (abc ghi / abc jkl) 

Are there any suggestions on how I can successful tag the buttons either with Launch settings or custom code? Appreciated!

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Establish
Level 2
Haran_Huang
Level 2

Likes

17 likes

Total Posts

54 posts

Correct reply

6 solutions
Top badges earned
Establish
Validate 1
Boost 5
Boost 3
Boost 10
View profile

Avatar
Establish
Level 2
Haran_Huang
Level 2

Likes

17 likes

Total Posts

54 posts

Correct reply

6 solutions
Top badges earned
Establish
Validate 1
Boost 5
Boost 3
Boost 10
View profile
Haran_Huang
Level 2

09-03-2020

Under the browser console, use getElementById () or getElementsByName () to get it, and then use custom js in the data element to get storage.

Answers (0)