Jquery mobile and mouseover event

白昼怎懂夜的黑 提交于 2020-02-03 09:42:12

问题


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");
});

回答1:


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");
});


来源:https://stackoverflow.com/questions/9904868/jquery-mobile-and-mouseover-event

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!