I’m trying to trigger an element to animate when the user hovers over a different element, and can’t figure out how to make this work. Anyone know a solution?
Here are my solutions that both solve 1/2 the problem, but I can’t seem to get either to solve the full problem (feedback appreciated):
I can use conditional logic to show/hide the element, but I’d prefer for it to animate in which looks more polished and professional. I only know how to trigger these animations in workflows and don’t know if there’s a way to do so from the conditional logic section.
I thought I might be able to do this by creating a custom state, but I can’t figure out how to set a custom state’s value when someone hovers on an element (which makes sense since the fact a user hovered over an item likely isn’t passed from the client back to the server where custom states are stored).
Hey @sridharan.s I’ve been thinking about how to do this too! Your post gave me the idea to have three elements:
Hover Button
Animate Button
Hidden Button
I set the Hover Button and the Animate Button to be visible on page load, and the Hidden Button to be hidden on page load. Then I set a condition on the Hidden Button which is “When Hover Button is Hovered, this element is visible”. Then in the workflow I created a ‘Do When Condition is True – Every Time’ (Hidden Button is visible) --> Element Actions --> Animate: Animate Button (Shake)". I think it seems to work as it should but double-check for sure!
For anyone interested, I think this also works to show a Group Focus on hover. So, the only difference you would make is that you’d have the conditional formatting on the Hidden Button to be:
“When Hover Button is hovered or GroupFocusA is hovered --> This element is visible”
And two events in the workflow, with the first being ‘Do When Condition is True – Every Time’ (Hidden Button is visible) --> Element Actions --> Show ‘GroupFocusA’. Then you’d have another event in the workflow which is ‘Do When Condition is True – Every Time’ (Hidden Button isn’t visible) --> Element Actions --> Hide ‘GroupFocusA’.