Why does jquery not natively support a .disable() method?
In jquery, we have to use the following syntax to disable/enable an element respectively:

    $('#elem').attr('disabled', 'disabled');
    $('#elem').removeAttr('disabled');

While this works, it's pretty ugly.  We can extend jquery to provide this functionality in a more concise way as follows:

    (function ($) {
        $.fn.disable = function () {
            return $(this).each(function () {
                $(this).attr('disabled', 'disabled');
            });
        };
        $.fn.enable = function () {
            return $(this).each(function () {
                $(this).removeAttr('disabled');
            });
        };
    })($);

and then we can just go:

    $('#elem').disable();
    $('#elem').enable();

I'm wondering if there is a good reason why jQuery doesn't provide this by default, as enabling and disabling form elements seems to be a very common task that could easily be simplified. Am I missing something?
Why does jquery not natively support a .disable() method?
===

In jquery, we have to use the following syntax to disable/enable an element respectively:

    $('#elem').attr('disabled', 'disabled');
    $('#elem').removeAttr('disabled');

While this works, it's pretty ugly.  We can extend jquery to provide this functionality in a more concise way as follows:

    (function ($) {
        $.fn.disable = function () {
            return $(this).each(function () {
                $(this).attr('disabled', 'disabled');
            });
        };
        $.fn.enable = function () {
            return $(this).each(function () {
                $(this).removeAttr('disabled');
            });
        };
    })($);

and then we can just go:

    $('#elem').disable();
    $('#elem').enable();

I'm wondering if there is a good reason why jQuery doesn't provide this by default, as enabling and disabling form elements seems to be a very common task that could easily be simplified. Am I missing something?