Created
October 7, 2014 08:44
-
-
Save jcsrb/2537cc03e09b995ccff9 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
(function (){ | |
var ua = navigator.userAgent.toLowerCase(); | |
var android = /Android/gi.test(ua); | |
var iOS = /(iPad|iPhone|iPod)/gi.test(ua); | |
if(android) { $("body").addClass("device-running-android"); } | |
if(iOS) { $("body").addClass("device-running-ios"); } | |
if(!iOS && !android) { $("body").addClass("device-not-running-ios-or-android"); } | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment