api.jquerymobile.com
api.jquerymobile.com copied to clipboard
Bad documentation for virtualized events
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".
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 ?