3

I'm trying to write a simple hover effect for a div element. I see that with Aurelia I can write something like:

<div mouseover.bind="myFunc()"></div>

Which works just fine however I need a mouseenter event and that does not work.

<div mouseenter.bind="myFunc()"></div> // does not work

Is there any roadmap to add all javascript events? Is there a temporary solution to get similar functionality to a mouseenter event instead of mouseover

Robinson Collado
  • 316
  • 4
  • 12
Rodrigo
  • 3,129
  • 3
  • 33
  • 61

1 Answers1

5

For mouseenter, trying using trigger instead of bind:

<div mouseenter.trigger='myFunc()'></div>

Mouseenter is a bubbling event and sometimes it doesn't bubble. Using trigger should trigger the non-bubbling event.

I would also look at this.

Community
  • 1
  • 1
Robinson Collado
  • 316
  • 4
  • 12