# "On Click" not working but "On Mouse Enter" does

**URL:** <https://community.weweb.io/t/on-click-not-working-but-on-mouse-enter-does/5557>\
**Category:** Ask us anything\
**Created:** [November 26, 2023, 12:57am UTC](https://community.weweb.io/t/on-click-not-working-but-on-mouse-enter-does/5557 "2023-11-26T00:57:44Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![sharonapicula](https://avatars.discourse-cdn.com/v4/letter/s/f6c823/32.png) [@sharonapicula](https://community.weweb.io/u/sharonapicula)\
**Post date:** [November 26, 2023, 12:57am UTC](https://community.weweb.io/t/on-click-not-working-but-on-mouse-enter-does/5557/1 "2023-11-26T00:57:45Z")

</div>

I have a workflow for a button, I try to trigger it “On click” but it doesn’t do anything, I tried with “On Mouse Enter” and now it does.

I really don’t understand why.

---

<div class="post-metadata">

**Author:** ![luka](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/luka/32/1571_2.png) [@luka](https://community.weweb.io/u/luka)\
**Post date:** [November 26, 2023, 2:33pm UTC](https://community.weweb.io/t/on-click-not-working-but-on-mouse-enter-does/5557/2 "2023-11-26T14:33:22Z")

</div>

Do you have a link setup on the button?

---

<div class="post-metadata">

**Author:** ![sharonapicula](https://avatars.discourse-cdn.com/v4/letter/s/f6c823/32.png) [@sharonapicula](https://community.weweb.io/u/sharonapicula)\
**Post date:** [November 26, 2023, 3:37pm UTC](https://community.weweb.io/t/on-click-not-working-but-on-mouse-enter-does/5557/3 "2023-11-26T15:37:55Z")

</div>

No, to be more precise, its a “Div” with a “Text” in it styled like a button.

Here how I set it up with “On Click”. It is **not** working

 ![Screenshot from 2023-11-26 16-24-03](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/1/13920eec903784e6e08f6bb5d2185144ba215158.png)

And here how i set it up with “On Mouse Enter”, and it **is** working

 ![Screenshot from 2023-11-26 16-26-35](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/a/a78b4c811a01aa3629f97408c95c5d7ae369b1ba.png)

My variable “passengerPicker” is to display or not a “div”. When I click on the “button”, the display change from “flex” to “none”.  
Here how i set it up, I blured out everything that is not relevent for more clarity and I put arrow on each component.

 ![Screenshot from 2023-11-26 16-28-58](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/5/5fac153f79c114dd8d86bbacaca3f30178479b78.jpeg)

---

<div class="post-metadata">

**Author:** ![raydeck](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/raydeck/32/384_2.png) [@raydeck](https://community.weweb.io/u/raydeck)\
**Post date:** [November 27, 2023, 9:16pm UTC](https://community.weweb.io/t/on-click-not-working-but-on-mouse-enter-does/5557/4 "2023-11-27T21:16:22Z")

</div>

Is there a parent element that is capturing the click event?

---

<div class="post-metadata">

**Author:** ![sharonapicula](https://avatars.discourse-cdn.com/v4/letter/s/f6c823/32.png) [@sharonapicula](https://community.weweb.io/u/sharonapicula)\
**Post date:** [December 10, 2023, 5:23pm UTC](https://community.weweb.io/t/on-click-not-working-but-on-mouse-enter-does/5557/5 "2023-12-10T17:23:55Z")

</div>

No, i dont think so
