Essential JavaScript and jQuery

  • 3/15/2013
In this chapter from Programming in HTML5 with JavaScript and CSS3 Training Guide: 70-480, you learn how to create objects, which are an important aspect of JavaScript, use objects to create entities, which are passed to and from the server, and to encapsulate functionality that you want to modularize. This chapter also introduces jQuery, the answer to writing browser-compatible code. Although jQuery doesn’t solve all browser-compatibility issues, it does solve most of the day-to-day issues that you encounter among browsers.

The flexibility of JavaScript is amazing. In the previous chapters, you learned how to add JavaScript code to your webpage to provide dynamic changes to the page when an event is triggered.

One of the biggest difficulties with webpage development is the differences among different browsers, but this book is primarily focused on HTML5, CSS3, and JavaScript (ECMAScript5.1). A completely separate book could be written that deals just with the differences among browsers and browser versions.

In this chapter, you learn how to create objects, which are an important aspect of JavaScript. You use objects to create entities, which are passed to and from the server, and to encapsulate functionality that you want to modularize. You also need to extend objects that others have created.

This chapter also introduces jQuery, the answer to writing browser-compatible code. Although jQuery doesn’t solve all browser-compatibility issues, it does solve most of the day-to-day issues that you encounter among browsers. In addition, jQuery is fun and easy to use.

Lessons in this chapter:

  • Lesson 1: Creating JavaScript objects
  • Lesson 2: Working with jQuery

Before you begin

To complete this book, you must have some understanding of web development. This chapter requires the hardware and software listed in the “System requirements” section in the book’s Introduction.