【发布时间】:2012-06-28 19:03:19
【问题描述】:
我在图像上悬停时遇到问题。
当进入站点时,悬停状态是活动的,但它不应该是直到鼠标悬停事件。 将鼠标移到图像上时,悬停效果消失并正常运行。
这是代码-sn-p: http://jsfiddle.net/JwztH/
希望我的问题可以理解。
【问题讨论】:
-
既然已经给出了答案,我对你的插件有一些建议。
1-Use on in place of live.2-return this from plugin.3-You can pass two functions to hover, in that case you need not to check event type -
如前所述,
live已被弃用,您真的不应该使用它。 liveisdeprecated.com -
感谢 James 的页面 +1。
标签: javascript jquery css hover state