jQuery 1.7.2 is missing $.support.touch - what to use instead?
I decided to try jQuery Mobile 1.2 alpha1 with my
jquery.mobile.iscrollview plugin. At the same time, I decided to try jQuery 1.7.2, since JQM 1.2 is now compatible.
The plugin uses
$.support.touch to know whether it should bind to touch events or not. Unfortunately,
$support.touch was removed from jQuery 1.7.2.
I realize that the documentation for
$.support says not to rely on
$support options sticking around in future versions - that it's really for internal use only, and when a feature detection is no longer needed, it is quickly removed.
The suggestion in the docs is to use some external library, such as Modernizr. But this seems a heavy-handed requirement for a plugin. I can't really ask users to also use Modernizr. What if they prefer another feature detection solution?
What are others using with 1.7.2 to detect if a browser supports touch events?
I disagree strongly with the decision to treat $.support as such a transient feature. Especially for something so fundamental as touch support. But in the mean time, what is a good workaround, other than dropping-back to 1.7.1?