Web Development with jQuery®

(Elliott) #1

(^94) ❘ CHAPTER 4 MANIPULATING CONTENT AND ATTRIBUTES
$('button#documentSetAttribute').click(
function(event)
{
event.preventDefault();
var input = getCheckbox();
input
.attr('disabled', true)
.parent('li')
.addClass('disabled');
}
);
The Set Attribute button disables the selected radio box with the disabled="disabled" attribute and
then adds the disabled class name to its parent

  • element. Adding the disabled class name to
    the parent
  • element allows the opacity of the
  • Free download pdf