:disabled Selector in jQuery

It helps to selects all elements that are disabled.

:disabled Selector

// HTML Form
<form>
<input name=”filed01″ disabled=”disabled”>
<input name=”filed02″>
</form>

// To finds all input elements that are disabled and change it value.

$( “input:disabled” ).val( “This field is disabled” );

Read more

.each() in jQuery

It iterate over a jQuery object, executing a function for each matched element.

.each()

// To alert the text of each < li> element:

$(“button”).click(function(){
    $(“li”).each(function(){
       alert($(this).text())
    });
});

Read more