iPad-Check

check, if device is an iPad

HTML

<p>iPad <span id="info">- sorry, device is not iPad!</span></p>LOO

JavaScript

window.ondevicemotion = function(event) {
    var version;
    if (navigator.platform.indexOf("iPad") != -1) {
        if (event.acceleration) {
            version = (window.devicePixelRatio === 2) ? 3 : 2;
        } else version = 1;
    }
    document.getElementById('info').innerHTML = version;
    window.ondevicemotion = null;
}