How to have a mouseover event fire only if the mouse is hovered over an element for at least 1 second?

前端 未结 4 1796
渐次进展
渐次进展 2020-12-02 15:46

I want to display a dialog when a user mouses over a certain image. That part works. Unfortunately if the mouse even just passes over the corner of the image quickly it will

4条回答
  •  一向
    一向 (楼主)
    2020-12-02 16:36

    check out the hoverintent http://cherne.net/brian/resources/jquery.hoverIntent.html it will do exactly what you want.

    I usually dont post links to answers but it is easy to use and would be good to read over it and learn it.

提交回复
热议问题