Hover Item with JQuery

前端 未结 4 1380
名媛妹妹
名媛妹妹 2020-12-06 19:04

Is there a way to hover an element using javascript? I don\'t want to create another class, I just want to cause element to hover with javascript when my mouse pointer is no

4条回答
  •  臣服心动
    2020-12-06 20:07

    I assume you mean the pseudo class :hover that you've associated with a link (for example). As you hover over that link, you want to invoke all other link's :hover styles.

    Unfortunately, you can not invoke the :hover styles from jQuery, that requires that you actually move your mouse pointer over that element. You have to use classes and utilize jQuery's hover event.

提交回复
热议问题