Skip to content

Instantly share code, notes, and snippets.

@cpojer
Created August 25, 2011 20:08
Show Gist options
  • Save cpojer/1171740 to your computer and use it in GitHub Desktop.
Save cpojer/1171740 to your computer and use it in GitHub Desktop.
change.js
if (!window.addEventListener){
Element.NativeEvents.propertychange = 2;
Element.Events.change = {
base: function(){
var type = this.type;
return (this.get('tag') == 'input' && (type == 'radio' || type == 'checkbox')) ? 'propertychange' : 'change'
},
condition: function(event){
return (this.type == 'radio' && !this.checked) ? false : true;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment