mouseenter without JQuery

后端 未结 4 1079
庸人自扰
庸人自扰 2020-12-08 22:43

What would be the best way to implement a mouseenter/mouseleave like event in Javascript without jQuery? What\'s the best strategy for cross browser use? I\'m thinking some

4条回答
  •  春和景丽
    2020-12-08 23:27

    The best way, imho, is to craft your own event system.

    Dean Edwards wrote one some years ago that I've taken cues from in the past. His solution does work out of the box however.

    http://dean.edwards.name/weblog/2005/10/add-event/

提交回复
热议问题