Created
September 20, 2011 01:31
-
-
Save jimisaacs/1228091 to your computer and use it in GitHub Desktop.
Zepto nested ready handlers lost within document.readyState == 'interactive'
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"/> | |
<title>title</title> | |
<script src="https://raw.github.com/madrobby/zepto/v0.7/src/zepto.js"></script> | |
<script> | |
$(document).ready(function(){ | |
console.log('READY IN THE HEAD', document.readyState); | |
}); | |
function PluginWithinBody() { | |
$(document).ready(function(){ | |
console.log('PluginWithinBody READY', document.readyState); | |
}); | |
} | |
function PluginWithinReady() { | |
$(document).ready(function(){ | |
console.log('PluginWithinReady READY', document.readyState); | |
}); | |
} | |
</script> | |
</head> | |
<body> | |
<script> | |
$(document).ready(function(){ | |
console.log('READY IN THE BODY', document.readyState); | |
PluginWithinReady(); | |
}); | |
PluginWithinBody(); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment