jquery hover event

 

Today I want to do a mouse hover event, so I use it habitually 

$(DOM).on("hover",function(){});

Actually the above code is wrong 

Checked the DHTML help manual and found that there is no onhover event, only

 

 

jQuery provides the hover method, examples are as follows:

 

<div style="border: 1px solid red;height: 200px;width: 200px;" id="hoverWidget">
	dasfdsaf
</div>
<script>
$("#hoverWidget").hover(function(){
	console.log("in");
},function(){
	console.log("out");
})
</script>

 

 

 

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326772666&siteId=291194637