Skip to content

Instantly share code, notes, and snippets.

@lsmith
Created May 10, 2011 23:39
Show Gist options
  • Save lsmith/965619 to your computer and use it in GitHub Desktop.
Save lsmith/965619 to your computer and use it in GitHub Desktop.
widget event
YUI().use('dial', 'event', function (Y) {
var dial = new Y.Dial({
min:-220,
max:220,
stepsPerRev:100,
value: 30
});
dial.after('render', function(e) {
dial.set('value', 101); // listen 1
dial._resetDial(); // listen 2
});
dial.on('valueChange', function(e) {
alert("BOOM");
});
dial.render("#demo");
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment