国产av日韩一区二区三区精品,成人性爱视频在线观看,国产,欧美,日韩,一区,www.成色av久久成人,2222eeee成人天堂

javascript - Can jquery .on('click',function(event){}) be changed to trigger when the mouse passes by?
曾經(jīng)蠟筆沒有小新
曾經(jīng)蠟筆沒有小新 2017-06-26 10:58:35
0
4
972

Can jquery .on('click', function(event){}) be changed to trigger when the mouse passes by?

曾經(jīng)蠟筆沒有小新
曾經(jīng)蠟筆沒有小新

reply all(4)
學(xué)霸

mouseover

淡淡煙草味

You can also use mouseenter and mouseleave encapsulated by JQ to achieve different effects

漂亮男人

I wrote it wrong, it should be a selector in front of it. It should be $("xxx").on("mouseenter",function(){}). This is triggered when the mouse enters. If you want to change it to trigger after leaving, change it to 'mouseleave'. Or use 'hover'. It is not recommended to use the three events of mouseover, mouseout, and mousemove. Mouseover and mouseout will also trigger events when entering or leaving child elements. The mousemove event is triggered too frequently and too high.

Ty80

If you just want to bind the mouse floating event, look at the code above. If you just want to trigger the click, look at the code:

$('p').on("mouseover",function(e){
    $(this).trigger("click");
});
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template