1 2 3 4 5 6
define(function () { $.fn.enabled = function (e) { $(this).prop('disabled', !e); $(this).trigger('enabled:change', e); }; });