Q:

how to remove HTML parameters in jquery

by default, my <button> has a disabled="disabled" value in my HTML markup.
which makes the <button> non-clickable
<button id="submit" value="submit" name="submit" class="btn btn-large btn-block btn-primary" disabled="disabled" type="submit">Submit</button>

if the <textarea> is more than 30 characters, it will remove the parameter disabled and make the button clickable
Im not sure how to  remove or even add parameters inside an html markup using jquery.
var $j = jQuery.noConflict();

$j(function(){

$j("#textField").keyup(function(){
    num = $j(this);
    if ($j(this).val().length >= 30 ) {
        $j("#charNum").text(30-num.val().length);
        $j('#submit") // disable
    }
    else {
           $j("#submit") // enable
    }

});
});

A:

Use .removeAttr() method.
var $j = jQuery.noConflict();

$j(function(){

$j("#textField").keyup(function(){
    num = $j(this);
    if ($j(this).val().length >= 30 ) {
        $j("#charNum").text(30-num.val().length);
        $j("#submit").removeAttr('disabled');
    }
    else {
           $j("#submit").attr('disabled', 'disabled');
    }

});
});

A:

To disable you can use
 $('#submit').prop('disabled', true);

To enable you can use
$("#submit").button( "enable" );

