jQuery移动和鼠标悬停事件 [英] Jquery mobile and mouseover event
本文介绍了jQuery移动和鼠标悬停事件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我希望当我在标签上移动鼠标时发出警报(某物"),我尝试了许多功能,但始终只有在单击标签时警报才起作用,而不是仅在标签上移动时警报才起作用! ! 我已经尝试过:
I want that when I move the mouse on a label I alert("something"), I have tried many functions but always the alert only works when I click on the label and not when I just move it on the label!! I have tried:
$("#show").mouseover(function(){
alert("something");
});
$("#show").mouseenter(function(){
alert("something");
});
$("#show").live('vmouseover', function() {
alert("something");
});
$("#show").hover(
function () {
alert("something");
});
推荐答案
您想查看jQuery-Mobile提供的特定于移动设备的虚拟事件.他们的描述可以在这里找到:
You want to look at the mobile specific virtual events that jQuery-Mobile provides. Their descriptions can be found here:
http://jquerymobile.com/demos/1.1.0-rc.1/docs/api/events.html
特别是,您要求将鼠标悬停在上面:
In particular, you are asking for mouseover:
$("#show").vmouseover(function(){
alert("something");
});
这篇关于jQuery移动和鼠标悬停事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文