If I write jQuery code as below;
$("input:checkbox").unbind("touchstart");
Here touchstart would only be recognized by the iPad.
Can this cause an issue on desktop browsers which do not understand touchstart and should I put this piece of code in an if (iPad) block
Also how does jQuery understand "touchstart" even though I could not find any reference to it in the JS library..
You can still unbind an event if the event isn’t supported. jQuery doesn’t understand touchstart, at least not in the way you expect. It just hold a list of handlers in name of ‘touchstart’ and if you call unbind it’ll remove them. If the browser doesn’t support touchstart you just won’t see the event fired.
Bear in mind it’s one thing to not support touch event and it’s another to have no touch device, latest desktop browser do support touch events.