您的位置:首页 > Web前端 > JQuery

jQuery hover方法

2016-07-27 15:35 597 查看

语法

$(selector).hover(inFunction,outFunction)
调用:

$( selector ).hover( handlerIn, handlerOut )

等同以下方式:

$( selector ).mouseover( handlerIn ).mouseout( handlerOut );

注意:如果只规定了一个函数,则它将会在 mouseover 和 mouseout 事件上运行。

调用:

$(selector).hover(handlerInOut)

等同于:

$( selector ).on( "mouseover mouseout", handlerInOut );
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: