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

Using selectors in MVC applications

So far, all recipes are based on using selectors with ASP.NET web forms. Next, we introduce an example to demonstrate the use of selectors in an ASP.NET MVC application. 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

.css()

jQuery method

This gets the CSS property of the first matched element or sets one or more CSS properties for every matched element

.each()

jQuery method ...

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