Chapter 6

AJAX and jQuery

What you will learn in this chapter:

  • How jQuery works
  • How to include jQuery in your pages
  • jQuery basics
  • How to manipulate page elements using jQuery
  • AJAX basics
  • How to use the JSON helper
  • Using jQuery plug-ins

The days of the static web disappeared with the introduction of server-side technologies. Developers began producing web applications instead of websites. These applications began to replace desktop software. However, as web-based software grew in abundance, it lacked a key feature often found in its desktop-related counterparts: usability. If parts of the page content changed as a result of user input, the user often had to wait for a full page refresh to see these changes. The interface was still static.

In the late 1990s, attempts to liven up web pages were made using Dynamic HTML (DHMTL), which relied on client-side scripting, most often using JavaScript to manipulate the underlying HTML in the browser. Some of these efforts were crass — you can still find sites where your mouse cursor is stalked by a trail of stars. Other attempts sought to solve usability problems by hiding and showing segments of the page as a result of mouse movement or click events, such as sliding menus and news tickers.

There is a fundamental problem with JavaScript: Different browser vendors create their own implementations. As browser vendors rushed new browsers out into the market during the early part of this century, they started developing their own custom features, ...

Get Beginning ASP.NET Web Pages with WebMatrix® now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.