Created
November 8, 2012 20:53
-
-
Save slieschke/4041513 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> | |
<title>Test</title> | |
<script src="http://yui.yahooapis.com/3.7.3/build/yui/yui-min.js"></script> | |
<script> | |
YUI().use('resize', function(Y) { | |
var resize = new Y.Resize({ node: '#demo' }); | |
// This event fires... | |
resize.on('start', function() { | |
Y.one('#debug1').set('innerHTML', new Date()); | |
}); | |
// ... but this one does not. | |
Y.on('resize:start', function() { | |
Y.one('#debug2').set('innerHTML', new Date()); | |
}); | |
}); | |
</script> | |
<style> | |
#demo { | |
height: 100px; | |
width: 100px; | |
border: 1px solid black; | |
background-color: #8DD5E7; | |
position: relative; | |
padding: 1em; | |
margin: 2em; | |
} | |
</style> | |
</head> | |
<body> | |
<div id="debug1"></div> | |
<div id="debug2"></div> | |
<div id="demo">Resize Me</div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment