博客
关于我
jQuery常用事件方法——mouseenter、mouseleave、hover方法
阅读量:326 次
发布时间:2019-03-04

本文共 1339 字,大约阅读时间需要 4 分钟。

jQuery?????Web??????????????????????????????????jQuery????????????

jQuery?????????

jQuery??????? JavaScript ??????????? jQuery ?????????????? JS???? "on" ???????????????????

??????

1. Mouse Enter ? Mouse Leave

  • mouseenter() ?????????????????
  • mouseleave() ?????????????????

?????mouseenter ? mouseleave ?????????????????????????????????????????????????????????? mouseover ? mouseout?

2. Code Comparison - mouseenter ? mouseleave

??????????? mouseenter ? mouseleave ???

$box.mouseenter(function() {    console.log("box mouse in");});$box.mouseleave(function() {    console.log("box mouse out");});$parent.mouseenter(function() {    console.log("parent mouse in");});$parent.mouseleave(function() {    console.log("parent mouse out");});

3. mouseover ? mouseout

?????????????????????????????? mouseover ? mouseout ???

$box.mouseover(function() {    console.log("box mouse in");});$box.mouseout(function() {    console.log("box mouse out");});$parent.mouseover(function() {    console.log("parent mouse in");});$parent.mouseout(function() {    console.log("parent mouse out");});

4. hover() ??

hover() ???? mouseenter ? mouseleave ????????????????????????????????????

$box.hover(function() {    $box.addClass("big");}, function() {    $box.removeClass("big");});

??

??????????????? jQuery ???????????????????????????????????????????????????????

转载地址:http://ojgq.baihongyu.com/

你可能感兴趣的文章
Office办公软件里的“开发工具”选项卡-ChatGPT4o作答
查看>>
OGG初始化之使用数据库实用程序加载数据
查看>>
ogg参数解析
查看>>
ognl详解
查看>>
Ogre 插件系统
查看>>
Oil Deposits
查看>>
oj2894(贝尔曼福特模板)
查看>>
OJ中处理超大数据的方法
查看>>
OJ中常见的一种presentation error解决方法
查看>>
OK335xS UART device registe hacking
查看>>
ok6410内存初始化
查看>>
OkDeepLink 使用教程
查看>>
Okhttp3添加拦截器后,报错,java.io.IOException: unexpected end of stream on okhttp3.Address
查看>>
OkHttp透明压缩,收获性能10倍,外加故障一枚
查看>>
OKR为什么到今天才突然火了?
查看>>
ol3 Demo2 ----地图搜索功能
查看>>
OLAP、OLTP的介绍和比较
查看>>
OLAP在大数据时代的挑战
查看>>
oldboy.16课
查看>>
OLEDB IMEX行数限制的问题
查看>>