Jquery mobile and mouseover event

10,336

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");
});
Share:
10,336
Aminesrine
Author by

Aminesrine

Front-End web developer.

Updated on June 26, 2022

Comments

  • Aminesrine
    Aminesrine about 2 years

    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");
    });
    
  • Jivings
    Jivings over 12 years
    @Bouaziz And you've tested it on a mobile device?
  • Jivings
    Jivings over 12 years
    @Bouaziz When are you expecting it to fire? The emulator wont catch a simple mouseover the element. And on an Android device when is there ever a mouseover? You either touch an element or swipe it.