api.jquerymobile.com icon indicating copy to clipboard operation
api.jquerymobile.com copied to clipboard

Bad documentation for virtualized events

Open elias6 opened this issue 12 years ago • 1 comments

I am looking at the documentation for the vclick event handler and I am confused.

  • It says it simulates the "onclick" handler for mobile devices. Should it say "click" instead of "onclick"? In any case, why would I want to do that? I am using click handlers and they seem to work fine on the devices I tested them on.
  • It mentions something about "missing mouse event triggers". What does that mean? Are there devices that don't trigger mouse events for taps?
  • The source for the example binds an event to "vclick" that shows a message saying "vmouseup fired.", although when I try the example, it says "vclick fired.". That may simply be a typo.
  • The "vclick fired." text comes up twice every time I click. At least that is what happened when I tried it in Chrome and Firefox for OS X.

I think it is unclear as to what advantages "vclick" may have over "click" or "onclick".

elias6 avatar Mar 05 '13 18:03 elias6

I would add that the reference to jQuery dependency is not clear :

This plugin extends jQuery's built-in method. If jQuery UI is not loaded, calling the .vclick() method may not fail directly, as the method still exists. However, the expected behavior will not occur.

Is jQuery UI really needed ?

matthieubrunet avatar Dec 16 '14 16:12 matthieubrunet