Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

DTM - Fire Single Call when Element becomes Visible

Avatar

Avatar
Validate 1
Level 1
craig_scribner1
Level 1

Likes

2 likes

Total Posts

9 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 1
View profile

Avatar
Validate 1
Level 1
craig_scribner1
Level 1

Likes

2 likes

Total Posts

9 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 1
View profile
craig_scribner1
Level 1

15-10-2015

I'm working with a site that's built a lot like an app--almost everything is on one html page. So I have to craft a page-to-page journey based either on what they click, or what shows up on the page. 

So is there a way to fire off a call when a certain element becomes visible? There are tons of elements that are hidden, and if I build an event-driven rule that waits for them to enter the viewport, they fire off even when they're hidden, which is no good to me.

thanks!

Craig

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Boost 3
Level 2
shawncreed1
Level 2

Likes

3 likes

Total Posts

25 posts

Correct Reply

12 solutions
Top badges earned
Boost 3
Boost 1
Affirm 5
Affirm 3
Affirm 10
View profile

Avatar
Boost 3
Level 2
shawncreed1
Level 2

Likes

3 likes

Total Posts

25 posts

Correct Reply

12 solutions
Top badges earned
Boost 3
Boost 1
Affirm 5
Affirm 3
Affirm 10
View profile
shawncreed1
Level 2

15-10-2015

Craig,

It's possible to do this using the CSS selector syntax in an event-based rule.  Set the event type to "element exists", and then use a selector like this:

div.hiddendiv[style*='display:block']

What this example does is looks for a div with a class of 'hiddendiv', and makes sure that the style includes "display:block".  You may have to tweak this approach depending on how your site developers are hiding/showing the elements, but something similar to this should accomplish what you need.

Hope this helps!

Best,
Shawn

Answers (0)