使用 jQuery,我向这样的元素添加了一个函数:
$('#theId').mouseenter(function(){
// ...
});
现在,我想#theId.mouseenter从脚本中调用与 , 关联的函数。我知道这是可能的:
$('#theId').mouseenter(theFunction);
function theFunction() {
// ...
}
有了这个,我可以theFunction()从脚本中调用。但我想知道是否有一个函数可以执行与#theId.mouseenter. 例如,可以elem.scroll通过执行来运行与相关联的函数$(elem).scroll();。有没有类似的mouseenter活动?