O'Reilly logo

ASP.NET jQuery Cookbook - Second Edition by Sonal Aneel Allana

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Enabling/disabling controls on a web form

This recipe demonstrates how to enable/disable controls dynamically on a web form in response to events triggered by other controls on the form. The constructs used in this example are as follows:

Construct

Type

Description

$("#identifier")

jQuery selector

This selects an element based on its ID

$(this)

jQuery object

This refers to the current jQuery object

:checked

jQuery selector

This selects checked input elements

.click()

jQuery event binder

This binds a handler to the click event of an element

.find()

jQuery method

This finds all elements matching the filter

.is()

jQuery method

This returns a Boolean value if the matched element satisfies a given condition

prop(propertyName) ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required