In an attempt to follow best practices, we try to use the appropriate JavaScript / jQuery events, depending on which device you are using. For example, we create a mobile site with a tag that will have an onclick or touch event. In the case of the iPhone, we would like to use the "touchstart" event. We want to check whether their device supports touchstart before associating this handler with an object. If it is not, then we will link onclick.
What is the best way to do this?
javascript jquery unobtrusive-javascript iphone mobile
Alex May 26 '10 at 18:54 2010-05-26 18:54
source share