EvanHahn


Member since 03/12/2012

Name: Evan Hahn

Website: http://www.evanhahn.com/

4 snippets

417 profile views

0 Comment(s) Posted

View their favorites

Profile

Achievement

first submission:submitting first snipplet

EvanHahn's Recent Snippets



« Prev 1 Next »
Add the "no-js" class to your topmost html element, so you can use CSS to style JavaScript-free pages. This snippet will then replace that tag with "js", allowing you to style pages with JavaScript. The excellent [HTML5 Boilerplate](http://html5bo...
0 305 posted 8 years ago by EvanHahn
Here's how to use this: * To access something in the local storage, type `Evan.local('name')`. You may need to use `JSON.parse()` on this result. Returns `null` if nothing's there. * To assign something in the local storage, type `Evan.local('nam...
1 107 posted 8 years ago by EvanHahn
This prepends a `#` if it's not already there. Useful when doing jQuery selectors.
0 85 posted 8 years ago by EvanHahn
`Object.create(null)` is a more memory-efficient way to make objects, but it's not supported in all versions of JavaScript, so you can do the "old-fashioned" `{}` if that function isn't available.
0 115 posted 8 years ago by EvanHahn
« Prev 1 Next »