Skip to content

Instantly share code, notes, and snippets.

@ericf
Created May 13, 2010 17:28
Show Gist options
  • Select an option

  • Save ericf/400106 to your computer and use it in GitHub Desktop.

Select an option

Save ericf/400106 to your computer and use it in GitHub Desktop.
YUI().use('widget', function(Y){
var widget = new Y.Widget();
widget.addAttr('type');
widget.after('typeChange', function(e){
this.get('boundingBox').replaceClass(this.getClassName(e.prevVal), this.getClassName(e.newVal);
});
widget.set('type', 'alert');
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment