Created
August 2, 2009 20:27
-
-
Save rmurphey/160201 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
/** | |
* a file that can be safely reloaded multiple times in the same page view, | |
* allowing some stuff to run once and some stuff to run every time the | |
* page is loaded | |
*/ | |
var myInitiallyFalseThing = false || myInitiallyFalseThing; | |
(function() { | |
if (!myInitiallyFalseThing) { | |
// do stuff that should only happen once | |
myInitiallyFalseThing = true; | |
} | |
// do other stuff | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment