Created
September 6, 2017 17:58
-
-
Save mpodaniev/4cb0e754c2f80b0a8fdcb735af1d79e4 to your computer and use it in GitHub Desktop.
Определение типа устройства
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)) { | |
// код для мобильных устройств | |
} else { | |
// код для обычных устройств | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment