我正在尝试使用 jQuery 在悬停时触发单击事件。
这很简单,但似乎我无法触发使用此方法刷新更新面板内容的 asp.net 链接按钮的单击。
这是代码 - 相当标准,所以不确定它会有所作为。
$("a.testbutton").mouseenter( function() {
$(this).trigger('click');
});
有任何想法吗?
我正在尝试使用 jQuery 在悬停时触发单击事件。
这很简单,但似乎我无法触发使用此方法刷新更新面板内容的 asp.net 链接按钮的单击。
这是代码 - 相当标准,所以不确定它会有所作为。
$("a.testbutton").mouseenter( function() {
$(this).trigger('click');
});
有任何想法吗?
以编程方式触发点击与实际点击事件不同,请尝试以下操作。
$("a.testbutton").mouseenter(function() {
window.location.href = this.href
});
你有没有尝试过
$("a.testbutton").mouseenter( function() {
$(this).click(function(alert();)) //replace alert(); with your refresh function
});