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
$ = jQuery | |
TIMEOUT = 20000 | |
lastTime = (new Date()).getTime() | |
setInterval -> | |
currentTime = (new Date()).getTime() | |
# If timeout was paused (ignoring small | |
# variations) then trigger the 'wake' event | |
if currentTime > (lastTime + TIMEOUT + 2000) |
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
/*globals $ */ | |
/* | |
* Patches the jQuery-animate method to use CSS-transitions when possible. | |
* | |
* - Depends on $.transit: http://ricostacruz.com/jquery.transit/ | |
* - Degrades gracefully to the original method when transitions aren't supported. | |
* - Provides fallbacks for translateX/Y's, so { x:10, y:10 } (very smooth) will become { top:10, left:10 } (less smooth) for less capable browsers. | |
* - 3d-transforms could be enabled with enable3d:true. Example: { x:100, enable3d:true } | |
* - Transitions could be disabled with enableTransitions:false. Example: { x:100, enableTransitions:false } |