# Triggering a second action on a second click

**URL:** https://forum.readymag.com/t/triggering-a-second-action-on-a-second-click/1918
**Category:** Animations
**Created:** [August 29, 2023, 4:55pm UTC](https://forum.readymag.com/t/triggering-a-second-action-on-a-second-click/1918 "2023-08-29T16:55:47Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![paul](https://avatars.discourse-cdn.com/v4/letter/p/bbe5ce/32.png) [@paul](https://forum.readymag.com/u/paul)
#### Post date: [August 29, 2023, 4:55pm UTC](https://forum.readymag.com/t/triggering-a-second-action-on-a-second-click/1918/1 "2023-08-29T16:55:47Z")

</div>

Hello!

I can move Object A onto the screen when Object B is clicked.

How do I move Object A back off of the screen when it is clicked? (or when Object C is clicked, for that matter)

Thanks for your help!

---

<div class="post-metadata">

### Author: ![Samus](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.readymag.com/samus/32/1146_2.png) [@Samus](https://forum.readymag.com/u/Samus)
#### Post date: [August 30, 2023, 4:45pm UTC](https://forum.readymag.com/t/triggering-a-second-action-on-a-second-click/1918/2 "2023-08-30T16:45:02Z")

</div>

In this case, clicking B will automatically reset to the initial state (prior animated); for example if clicking object B moves Object A 100px to the left then clicking it again will revert it back 100px to the right. Same goes if you add a secondary trigger.

Think of triggers as on/off light switches; even if you have 2 or 3 of then, light will either turn on or off.

---

<div class="post-metadata">

### Author: ![Olga\_Kostyrko](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.readymag.com/olga_kostyrko/32/1293_2.png) [@Olga\_Kostyrko](https://forum.readymag.com/u/Olga_Kostyrko)
#### Post date: [September 7, 2023, 12:05am UTC](https://forum.readymag.com/t/triggering-a-second-action-on-a-second-click/1918/3 "2023-09-07T00:05:13Z")

</div>

and what about if you want any click anywhere outside object B to revert it?

---

<div class="post-metadata">

### Author: ![Samus](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.readymag.com/samus/32/1146_2.png) [@Samus](https://forum.readymag.com/u/Samus)
#### Post date: [September 8, 2023, 10:43pm UTC](https://forum.readymag.com/t/triggering-a-second-action-on-a-second-click/1918/4 "2023-09-08T22:43:54Z")

</div>

Don’t think that is possible; animation is only initiated/reverted when interacting with the triggers you specify. I guess you could place a big transparent shape or something similar around object B, so when clicking around it ‘affect’ the animation.

Tricky though 🙃
