Chapter 3: Adding jQuery
In This Chapter
Understanding what jQuery is
Installing jQuery
Adding jQuery to a page
Adding HTML with jQuery
Changing styles with jQuery
jQuery is a JavaScript library. Okay, that might not make much sense. What’s a JavaScript library? A JavaScript library is a collection of code that you use when you want to get access to additional functionality or make life easier. jQuery does both.
jQuery is simply JavaScript that you add to your web page to make writing JavaScript easier. You still use JavaScript with jQuery, so everything you learn in Chapter 2 is not wasted. However, there are certain things that jQuery does much better than plain old JavaScript. Working with web pages is one such thing. For instance, where you might use getElementById
, jQuery has things called selectors that enable much more powerful ways to access things on a web page for JavaScript to use.
This chapter explains how to get started with jQuery and then shows some examples using ...