将鼠标悬停在Jquery中的v / s悬停 [英] Mouseover v/s hover in Jquery

查看:94
本文介绍了将鼠标悬停在Jquery中的v / s悬停的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这个问题是与信息有关的。即时通讯新的jQuery。我在HTML& CSS。



Hover& amp; amp;在Jquery中移植鼠标。
当它们悬停在元素上时,它们都不是被激活的。

解决方案

hover()函数更高级别 - 它的目的是调用函数来处理mouseenter事件和mouseleave事件。对于具有悬停和正常状态的UI元素(例如按钮),这非常方便。

mouseover()函数专门绑定到mouseover事件。对于只在鼠标穿过边界进入元素时才关心的情况,以及在离开时不太在意会发生什么情况。当您想要在某个元素上触发事件时,它也是调用的函数。



解释从
http://www.quora.com/jQuery/What-is-the-difference-between-the-hover-and-鼠标悬停功能


This question is info related. Im new to jquery. I am pretty experienced in HTML & CSS.

What is the difference between Hover & Mouseover in Jquery. Ain't they both activated when hovering over an element.

解决方案

The hover() function is more high level - it's built to call functions to handle both a mouseenter event and a mouseleave event. It's very convenient for a UI element that has a hover and normal state (e.g. a button.)

The mouseover() function specifically binds to the mouseover event. It's best for situations where you only care when the mouse has crossed the border into an element and you don't really care what happens if it leaves. It's also the function to call when you want to trigger the event on some element.

EXPLANATION FROM: http://www.quora.com/jQuery/What-is-the-difference-between-the-hover-and-mouseover-functions

这篇关于将鼠标悬停在Jquery中的v / s悬停的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆