-
-
Save rgrove/557733 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> | |
<title>ValueChange Multiple Subscriptions</title> | |
</head> | |
<body> | |
<h1>ValueChange Multiple Subscriptions</h1> | |
<form method="get" action=""> | |
<fieldset> | |
<legend>Da Form</legend> | |
<label for="my-input">Type Here »</label> | |
<input id="my-input" type="text" /> | |
</fieldset> | |
</form> | |
<script src="../../build/yui/yui.js"></script> | |
<script> | |
YUI({ | |
combine : false, | |
filter : 'RAW' | |
}).use('node', 'event-valuechange', function(Y){ | |
var myInput = Y.one('#my-input'); | |
myInput.on('valueChange', function(e){ | |
Y.log('sub 1: ' + e.newVal); | |
}); | |
myInput.on('valueChange', function(e){ | |
Y.log('sub 2: ' + e.newVal); | |
e.stopPropagation(); | |
}); | |
}); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment