Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

Event Handling > Virtual Clicks Events

Virtual Clicks Events

Virtual click? That sounds strange, right? Let’s talk about it for a minute. Most mobile touch web browsers have a delay of 300–500 milliseconds when you are using click events (such as click, mouseover) and this delay is not there when you are using touch events (such as touchstart, touchmove). The other problem is that not every touch browser supports touch events.

Virtual click events are wrappers that we can use instead of touch or click events and they will choose the right one depending on the platform you are running. It also normalizes position information and can be used only for single touch (not multi-touch).

Virtual click events can be used exactly the same as the click events, but the event name has a v prefix. The framework includes: vclick, vmouseover, vmousedown, vmousemove, vmouseup, and vmousecancel.


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial