Created
May 6, 2010 18:15
-
-
Save boucher/392481 to your computer and use it in GitHub Desktop.
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<script type="text/javascript"> | |
function load() | |
{ | |
var foo = document.getElementById("foo"), | |
bar = document.getElementById("bar"), | |
baz = document.getElementById("baz"); | |
baz.contentDocument.write("<!DOCTYPE html><html><head></head><body><div style='height:1000px; background-color:yellow;'></div></body></html>"); | |
window.addEventListener("DOMMouseScroll", mouseWheel, true); | |
window.addEventListener("mousewheel", mouseWheel, true); | |
} | |
function mouseWheel(anEvent) | |
{ | |
console.log("wheel: "+anEvent); | |
} | |
</script> | |
</head> | |
<body onload="load();"> | |
<div id="foo" style="width:500px; height:300px; background-color:red;"> | |
<div id="bar" style="width:400px; height:200px; top: 50px; left: 50px; position: absolute; background-color:blue;"> | |
<iframe id="baz" style="width:100%; height:100%"></iframe> | |
</div> | |
</div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment