且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何使用jquery模拟mouseover事件?

更新时间:2021-10-20 04:44:57

尝试:

$(".star_5").trigger('mouseover');

这将触发鼠标悬停操作,无论它发生在什么地方,而不是模拟它,从而提供了一种针对将来的措施,以防止更改鼠标悬停处理程序.

This will trigger the mouseover action whatever it happens to be, rather than emulating it, offering a measure of future-proofing against changes to the mouseover handler.