Jquery mobile and mouseover event

2019-07-03 21:57发布

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条回答
成全新的幸福
2楼-- · 2019-07-03 22:24

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");
});
查看更多
登录 后发表回答