Once again I'll be speaking at DevConnections this fall. One of my talks will provide a concise introduction to jQuery for ASP.NET developers. Since Microsoft has embraced jQuery and is shipping it with their Visual Studio templates, a solid understanding of how jQuery works is fundamental for many modern ASP.NET web applications.
I plan on covering a variety of topics, which includes (but is certainly not limited to) the following list.
Accessing elements $() may also be used to access elements on the page. jQuery supports most CSS selectors (including options provided by the upcoming CSS3 standard). One common approach is to use the CSS class name provided in an element's class attribute, or to access an element via its ID. However when using ASP.NET Web Forms you need to be careful as some controls rewrite the ID. In that case, using the element's ClientID property can provide the correct value.
Event handling jQuery provides several ways to implement event handling. For many common events, the framework offers a built-in methods. For instance the click() method may be used to provide code once the user clicks on the current element. The actual code is usually written in form of an anonymous function.
Manipulate elements There are several mechanisms to manipulate an element via jQuery. For CSS operations, the css() method is quite common to set individual styles.
Chaining The return value of most jQuery methods is a jQuery "object", as is the return value of $() itself. This allows fluent interfaces, or chaining, by calling several methods directly in a row.
The following codes sums all up: jQuery is loaded (step 1), and after the DOM is ready (step 2) we access the Label element on the page (step 3). Once the user clicks on it (step 4), we change a CSS property (step 5) and use some other jQuery magic to animate it (step 6).