Created
October 25, 2010 14:35
-
-
Save olvado/645052 to your computer and use it in GitHub Desktop.
An example of using Modernizr in JavaScript
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
| if (Modernizr.localstorage) { | |
| localStorage.setValue('my_key','my_value') | |
| } else { | |
| document.cookie = 'my_key=my_value; expires=Thu, 2 Aug 2011 21:40:00 UTC; path=/' | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment