Skip to content

Instantly share code, notes, and snippets.

@ABM-Dan
Created January 15, 2016 00:20
Show Gist options
  • Save ABM-Dan/1bd41c3003996bca066f to your computer and use it in GitHub Desktop.
Save ABM-Dan/1bd41c3003996bca066f to your computer and use it in GitHub Desktop.
// Implements a works-as-you-expect version of .change on radio buttons
(function ($) {
$.fn.fixChange = function (callable) {
return this.each(function () {
return $('[name[' + $(this).name + ']').change(callable.call($(this)))
});
};
}(jQuery));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment