Created
September 25, 2010 07:44
-
-
Save tvandervossen/596593 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<script src="zepto_original.js"></script> | |
</head> | |
<body> | |
<div id="canvas"><div id="slide1"><img></div></div> | |
<script> | |
var slide = $('#slide1'); | |
console.log(slide.get(0)); // Returns div element. | |
var img = $('#slide1 img'); | |
console.log(slide.get(0)); // Should return div element, but returns img element instead. | |
</script> | |
</body> | |
</html> |
This is expected for now, see http://twitter.com/thomasfuchs/status/25483584102 and http://twitter.com/thomasfuchs/status/25483589693
Yeah, I see.. also my example was unreasonable..
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
edit:
Strange, maybe this has something to do how console.log() internaly works.. try this..
..works
also alert() works fine..