-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating
jQuery Mobile Cookbook
By :
The jQuery Mobile framework provides virtual mouse or vmouse events to abstract the mouse and touch events.
You don't have to write separate handlers for the touch and mouse events for each of the supported platforms or devices. You just have to write the event handlers for the vmouse events and this will work across various platforms. There are seven vmouse events supported by the framework:
vmousemove
,
vmouseover
,
vmouseout
,
vmousedown
,
vmouseup
, vclick
, and vmousecancel
. This recipe shows you how to use these vmouse events.
Copy the full code of this recipe from the code/08/vmouse sources folder. You can launch this code by using the URL http://localhost:8080/08/vmouse/main.html.
The steps to be followed are:
Create main.html with content having seven div tags for the seven vmouse events, as follows:
<div data-role="content"> <div id="move"></div> <div id="over"></div> <div id="out...
Change the font size
Change margin width
Change background colour