You should be able to detect an iPad user by taking a look at the userAgent property:
var is_iPad = navigator.userAgent.match(/iPad/i) != null;
Similarly, the platform property to check for devices like iPhones or iPods:
While it works, you should generally avoid performing browser-specific detection as it can often be unreliable (and can be spoofed). It's preferred to use actual feature-detection in most cases, which can be done through a library like Modernizr.