Last active
December 24, 2015 00:59
-
-
Save sdthornton/6720490 to your computer and use it in GitHub Desktop.
For checking mobile browsers (covers 90% of all mobile browsers but doesn't cover mobile browsers pre-2004, which should be okay)
This file contains hidden or 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
Step 1 (add script to <head>): | |
<head> | |
<script>/Mobile|Android|BlackBerry/i.test(navigator.userAgent)&&(document.documentElement.className+=" mobile_browser");</script> | |
</head> | |
Step 2 (add css declaration): | |
.link_to_show { | |
display: none; | |
} | |
.mobile_browser .link_to_show { | |
display: block; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment