My Cart (0)

Customer Service 1-800-221-5528

Murach’s JavaScript and jQuery (3rd Edition)

by Mary Delamater and Zak Ruvalcaba
18 chapters, 632 pages, 252 illustrations
Published February 2017
ISBN 978-1-943872-05-3
Print: $46.00
List Price: $57.50 Save 20%
eBook: $42.00
List Price: $52.50 Save 20%
Print + eBook: $56.00
List Price: $70.00 Save 20%

Today, JavaScript is used on most of the pages of a modern website, from small individual sites to the largest commercial sites. And wherever JavaScript is used, you’ll also find jQuery. That’s why every web developer should know how to use JavaScript for what it does best and jQuery for what it does best. Now, this one book will help you master all of the JavaScript and jQuery skills that every web developer should have.

College Instructors

Go to our instructor’s site to learn more about this book and its instructor’s materials.

If you are new to web design or an old pro like me, this book is a must-have in my opinion. I love how it starts out with the basics and then moves on to the good stuff. Each chapter is full of examples and sample code showing you how to do the most common techniques that you will face as a web developer or designer. I have not seen a better book on the subject.”

Shawn Jackson, Web Developer, Colorado

  • About this Book
  • Table of Contents
  • FREE Downloads
  • Book FAQs
  • Corrections
  • Reviews

What this book does

To present the JavaScript and jQuery skills that you need in a manageable progression, this book is divided into three sections. These sections represent the three levels of expertise that you’ll develop with this book.

Section 1: JavaScript essentials

  • Section 1 of this book presents a 7-chapter course in JavaScript that gets you off to a great start. This section works for programming novices as well as experienced programmers because it lets you set your own pace. If you’re a beginner, you’ll move slowly and do all the exercises. If you have some experience, you’ll move more quickly and do the exercises that you choose. When you finish this section, you’ll have a solid set of JavaScript skills, especially the skills that help you get the most from jQuery.

Section 2: jQuery essentials

  • After you learn the JavaScript essentials, the 5 chapters in section 2 present the jQuery skills that every web developer should have. The first chapter in this section presents the core jQuery skills, and the next 3 chapters focus on effects and animations, forms and data validation, jQuery plugins, and jQuery UI widgets. Then, the last chapter in this section shows you how to use Ajax and JSON so you can get data from a web server and add it to a web page without reloading the entire page.

Section 3: Advanced JavaScript skills

  • After you finish sections 1 and 2, you’ll have the JavaScript and jQuery skills that every web developer should have. Then, the 6 chapters in section 3 will take your JavaScript skills to the next level of expertise. Here, you’ll learn how to use numbers, strings, dates...how to handle exceptions and use regular expressions...when and how to use browser objects, cookies, web storage, and arrays...and how to create and use your own objects. Then, the last chapter in this section presents expert level skills like how to use closures, the module pattern, and IIFEs as you create your own jQuery plugins.
  • What’s especially interesting about section 3 is that all of the examples show you how to use the JavaScript skills that you’re learning in conjunction with your jQuery skills. This is clearly the best way to learn the advanced JavaScript skills because that’s the way applications are coded in the real world. And yet, we haven’t seen another book that combines JavaScript and jQuery in this way.

Why you'll learn faster and better with this book

Like all our books, this one has features that you won’t find in competing books. That’s why we believe you’ll learn faster and better with our book than with any other. Here are a few of those features.

  • This book is designed to teach you the skills you’re going to need on the job without wasting your time on skills that you aren’t likely to need. That sounds simple, but most JavaScript and jQuery books either overwhelm you with information that you’ll never use or trivialize the subject by avoiding all of the complications. For instance, this book shows you the basics of DOM scripting with JavaScript, but then it shows you how to use jQuery for DOM scripting because that’s the best way to develop JavaScript applications.
  • If you page through this book, you’ll see that all of the information is presented in “paired pages,” with the essential syntax, guidelines, and examples on the right page and the perspective and extra explanation on the left page. This helps you learn faster by reading less...and this is the ideal reference format when you need to refresh your memory about how to do something.
  • To show you how JavaScript and jQuery work, this book presents 50 complete JavaScript and jQuery applications that range from the simple to the complex. Even better, from section 2 on, both JavaScript and jQuery are used in every application because that’s the best way to develop JavaScript applications. We believe that studying the code for complete applications is critical to the learning process... and yet you won’t find programs like ours in other JavaScript and jQuery books.
  • Of course, this book also presents dozens of short examples, so it’s easy to find an example that shows you how to do what you want to do. Even better, our paired pages make it much easier to find the examples that you’re looking for than it is with traditional books in which the examples are embedded in the text.
  • Like all our books, this one has exercises at the end of each chapter that give you hands-on experience by letting you practice what you’ve learned. These exercises also encourage you to experiment and to apply what you’ve learned in new ways…just as you’ll have to do on the job.

Who this book is for

This book is for anyone who needs to know how to develop JavaScript and jQuery applications. Today, that includes just about all web developers who are in either of these groups:

  • Web designers who use HTML and CSS and would like to know how to build applications with JavaScript and jQuery.
  • Server-side programmers who use languages like ASP, JSP, Python, or PHP and would like to add JavaScript and jQuery programming to their skillsets.

Remember too that this book will work for you whether or not you have any programming experience.

What software you need

To develop JavaScript applications, you need:

  • any text editor (this book recommends Aptana Studio 3, which is available for free)
  • Google Chrome along with the default browser on your system: Internet Explorer or Edge for Windows users and Safari for Mac OS

Although you can use any text editor with this book, a text editor that includes syntax coloring and auto-formatting will help you develop applications more quickly and with fewer errors. That’s why we recommend Aptana Studio 3. It’s available for free, it can be used for entering JavaScript and jQuery code (as well as HTML and CSS code), and it runs on both Windows and Mac OS systems.

To test a web page, you can use the default browser on your system. But we recommend that you also test your pages in Chrome, which includes a terrific set of developer tools.

To help you install these products, Appendix A provides the procedures that you’ll need. In addition, chapter 1 presents a short tutorial on using Aptana, and chapter 5 shows you how to use Chrome for debugging.

What's new with ECMAScript 2015 and 2016

Because the book focuses on the essential JavaScript and jQuery skills, it doesn’t present all of the new features that are in the ECMAScript 2015 and 2016 specifications. If you want to learn how to use those features, though, we offer a FREE PDF called “What’s new with ECMAScript 2015 and 2016” that presents all of the new features plus the Internationalization API.

This PDF is both tutorial and reference, and it’s especially designed for use with our JavaScript and jQuery book. You can get this download by going to the FREE Downloads tab.

The perfect companion book

Murach’s HTML5 and CSS3 (3rd Edition)

Murach’s HTML5 and CSS3 is the perfect companion to our JavaScript and jQuery book because it shows how to build web pages with the HTML5 and CSS3 that interfaces with JavaScript and jQuery. When you combine this book with our JavaScript and jQuery book, you’ll have a complete reference set for building web pages.

What people said about the first edition

“If you are new to web design or an old pro like me, this book is a must-have in my opinion. I love how it starts out with the basics and then moves on to the good stuff. Each chapter is full of examples and sample code showing you how to do the most common techniques that you will face as a web developer/designer.
     “I have not seen a better book on the subject. This one will be on my desk for a while!”
- Shawn Jackson, Web Developer, Colorado

From Dr. Dobb’s Must-Have Books for JavaScript: “The aim of the book is to teach jQuery in an intensely hands-on way. It succeeds in this and probably provides the fastest way to learn and master the framework.”
- Andrew Binstock, Editor-in-Chief, Java Magazine

“I just finished a pretty heavy application project, the first serious work I have done with jQuery and Ajax. Along the way, I had to deal with preloading images, manipulations of the DOM, tabs, plugins, and Dialogs…. I kept this book at my side throughout the entire project, and it was indispensable. The answers were right there at every turn. All the examples made sense to me, and they all worked!”
- Alan Vogt, ETL Consultant, Information Builders, Inc.

“What I like about this and other Murach books is that within minutes of opening the book, you are developing hands-on with the technology in question.”
- Charles Zimmerman, Developer

“An essential characteristic of this book, as well as the other Murach books, is that the examples, programs, and applications are all thoroughly tested. This book will work WONDERFULLY to help you build better and more robust websites!”
- Marvin Schneider, Instructor, New York

“I have several books on JavaScript, but the best one is this one. The text, examples, descriptions, and even the layout all bring you, the learner, an ease of use that is missing in other books.”
- Chris Wallace, Denver Visual Studio User Group

To view the table of contents for this book in a PDF, just click on the link below:

Table of Contents

Section 1 JavaScript essentials

Chapter 1 Introduction to web development

How a web application works

The components of a web application

How static web pages are processed

How dynamic web pages are processed

How JavaScript is used for client-side processing

What you need to know about the ECMAScript specification

The components of a JavaScript application

The HTML

The CSS

The JavaScript

The HTML skills that you need for this book

How to use the HTML5 semantic elements

How to use the div and span elements

How to use the basic HTML attributes

The CSS skills that you need for this book

How to provide the CSS styles for an HTML page

How to code the basic CSS selectors

How to code CSS style rules

How to test a JavaScript application

How to run a JavaScript application

How to find errors in your code

How to provide cross-browser compatibility

How to use Aptana to develop JavaScript applications

How to create or import a project

How to work with files

How to edit a file

How to run a JavaScript application

Chapter 2 Getting started with JavaScript

How to include JavaScript in an HTML document

Two ways to include JavaScript in the head of an HTML document

How to include JavaScript in the body of an HTML document

The JavaScript syntax

How to code JavaScript statements

How to create identifiers

How to use comments

How to work with JavaScript data

The primitive data types

How to declare and assign values to variables

How to code arithmetic expressions

How to use arithmetic expressions in assignment statements

How to concatenate strings and include special characters in strings

How to use objects, methods, and properties

Introduction to objects, methods, and properties

How to use the parseInt() and parseFloat() methods of the window object

How to use the write() and writeln() methods of the document object

Two illustrative applications

The Miles Per Gallon application

The Test Scores application

Chapter 3 The essential JavaScript statements

How to code conditional expressions

How to use the relational operators

How to use the logical operators

How to code the basic control statements

How to code if statements

How to code while and do-while loops

How to code for loops

Three illustrative applications

The enhanced Miles Per Gallon application

The Future Value application

The enhanced Test Scores application

How to work with arrays

How to create and use arrays

How to use for loops to work with arrays

The Test Scores application with an array

The user interface

The JavaScript

Chapter 4 How to work with JavaScript objects, functions, and events

How to use objects to work with data

How to use the window and document objects

How to use Textbox and Number objects

How to use Date and String objects

How to use functions

How to create and call a function expression

How to create and call a function declaration

When and how to use local and global variables

When and how to use strict mode

How to handle events

How to attach an event handler to an event

How to use an onload event handler to attach other event handlers

Two illustrative applications

The Miles Per Gallon application

The Email List application

Chapter 5 How to test and debug a JavaScript application

An introduction to testing and debugging

The three types of errors that can occur

Common JavaScript errors

How to plan the test runs

How to use top-down coding and testing to simplify debugging

How to debug with Chrome’s developer tools

How to use Chrome to find errors

How to use breakpoints and step through your code

Other debugging methods

How to trace the execution of your JavaScript code

How to view the source code

When and how to validate the HTML

Chapter 6 How to script the DOM with JavaScript

DOM scripting properties and methods

DOM scripting concepts

The properties of the Node interface

The methods of the Document and Element interfaces

The properties of the DOM HTML specification

The FAQs application

The HTML and CSS

The JavaScript

How to script forms and controls

How forms work

How to script Textbox, Textarea, and Select objects

How to script Radio and Checkbox objects

How to use the methods and events for forms and controls

The Register application

The HTML and CSS

The JavaScript

How to add and remove nodes from the DOM

How to use the innerHTML property of the Element interface

How to view the changes to the DOM in Chrome

The Register application with a table

The HTML and CSS

The JavaScript

Chapter 7 How to work with links, images, and timers

How to work with links and images

How to cancel the default action of an event

How to preload images

The Image Swap application

The HTML and CSS

The JavaScript

How to use timers

How to use a one-time timer

How to use an interval timer

The Slide Show application

The HTML and CSS

The JavaScript

Section 2 jQuery essentials

Chapter 8 Get off to a fast start with jQuery

Introduction to jQuery

What jQuery is

How jQuery can simplify JavaScript development

The basics of jQuery programming

How to include jQuery in your web pages

How to code jQuery selectors

How to call jQuery methods

How to use jQuery event methods

The Email List application in jQuery

The user interface and HTML

The jQuery

A working subset of selectors, methods, and event methods

The most useful selectors

The most useful methods

The most useful event methods

Other event methods that you should be aware of

Three illustrative applications

The FAQs application in jQuery

The Image Swap application in jQuery

The Image Rollover application in jQuery

Chapter 9 How to use effects and animations

How to use effects

The jQuery methods for effects

The FAQs application with jQuery effects

A Slide Show application with effects

The user interface, HTML, and CSS

Two ways to code the jQuery

How to stop and start a slide show

How to use animation

How to use the basic syntax of the animate() method

How to chain animate() methods

How to use the delay(), stop(), and finish() methods

How to use easings with effects and animations

How to use the advanced animate syntax and the methods

for working with queues

A Carousel application with animation

The user interface, HTML, and CSS

The jQuery

Chapter 10 How to work with forms and data validation

Introduction to forms and controls

How forms work

The HTML5 controls for working with forms

The HTML5 and CSS3 features for data validation

How to use jQuery to work with forms

The jQuery selectors and methods for forms

The jQuery event methods for forms

A Validation application that uses JavaScript

The user interface and HTML

Some of the JavaScript for the application

Chapter 11 How to use jQuery plugins and jQuery UI widgets

Introduction to jQuery plugins

How to find jQuery plugins

How to use any jQuery plugin

How to use three of the most popular plugins

How to use the Lightbox plugin for images

How to use the bxSlider plugin for carousels

How to use the Cycle 2 plugin for slide shows

Introduction to jQuery UI

What jQuery UI is and where to get it

How to download jQuery UI

How to include jQuery UI in your web pages

How to use any jQuery UI widget

How to use five of the most popular jQuery UI widgets

How to use the Accordion widget

How to use the Tabs widget

How to use the Button and Dialog widgets

How to use the Datepicker widget

Chapter 12 How to use Ajax, JSON, and Flickr

Introduction to Ajax

How Ajax works

Common data formats for Ajax

The members of the XMLHttpRequest object

How to use the XMLHttpRequest object

How to use the jQuery shorthand methods for Ajax

The jQuery shorthand methods for working with Ajax

How to use the load() method to load HTML data

How to use the $.get() or $.post() method to load XML data

How to use the $.getJSON() method to load JSON data

How to send data with an Ajax request

How to use the $.ajax() method for working with Ajax

The syntax of the $.ajax() method

How to use the $.ajax() method to load data

How to use Ajax with Flickr

How to use the feed API for Flickr

How to display Flickr data on a page

How to review the feed from a website

How to display descriptions for a Flickr photo feed

How to search for photos by tags

Section 3 Advanced JavaScript skills

Chapter 13 How to work with numbers, strings, and dates

How to work with numbers

How to use the properties and methods of the Number object

How to use the properties and methods of the Math object

How to generate a random number

The PIG application

The HTML

The JavaScript

How to work with strings

How to use the properties and methods of the String object

Examples of working with strings

How to work with dates and times

How to create Date objects

The methods of the Date object

Examples of working with dates

The Count Down application

The HTML and CSS

The JavaScript

Chapter 14 How to work with control structures, exceptions, and regular expressions

What else you need to know about control structures

How to use the equality and identity operators

How to use the break and continue statements

How to use the switch statement

How to use the conditional operator

How to use the AND and OR operators for selections

The Invoice application

The HTML

The JavaScript

How to handle exceptions

How to use try-catch statements

How to create and throw Error objects

How to use regular expressions

How to create and use regular expressions

How to match special characters and types of characters

How to match string positions, subpatterns, and repeating patterns

Regular expressions for data validation

The Account Profile application

The HTML and CSS

The JavaScript

Chapter 15 How to work with browser objects, cookies, and web storage

How to script browser objects

How to use the location object

How to use the history object

The Tutorial application

The HTML

The JavaScript

How to use cookies

An introduction to cookies

How to create cookies

How to read cookies

How to delete cookies

The Task List application

The HTML and CSS

The JavaScript

How to use web storage

How to use local and session storage

The Task List application with web storage

How to use Chrome to work with items in the browser

How to view and delete cookies

How to view, edit, and delete items in web storage

Chapter 16 How to work with arrays

How to create and use an array

How to create an array

How to add and delete array elements

How to use for loops to work with arrays

How to use for-in loops to work with arrays

How to use the methods of an Array object

Methods that accept simple parameters

Methods that accept functions as parameters

Examples of the Array methods

The Task List application

The user interface

The JavaScript

Other skills for working with arrays

How to use a String method to create an array

How to create and use an associative array

How to create and use an array of arrays

The Task List 2.0 application

The HTML

The JavaScript

Chapter 17 How to create and use your own objects

Basic skills for working with objects

How to create and use the native object types

How to create your own objects with object literals

How to extend or modify an object

How to create and use JavaScript libraries

The Miles Per Gallon application

The HTML

The JavaScript

How to create and call constructors

How to create your own object types with constructor functions

What else you should know about prototypes

The Trips application

The HTML

The JavaScript

How to create a factory function

How to use the create() method of the Object object

The Trips application with a factory function

Advanced skills for working with objects

How to use the arguments property of a Function object

How to create cascading methods

How to inherit methods from another object

How to use the this keyword

The Task List application

The HTML and CSS

The task and storage libraries

The task list library

The main JavaScript file

Chapter 18 How to create and use closures, IIFEs, the module pattern, and plugins

How to use closures

How closures work

How to use closures to create private state

How to work with the this keyword in closures

The Slide Show application

The HTML

The slide show library

The main JavaScript file

How to use immediately invoked function expressions

How to code an IIFE

How to use an IIFE to solve the closure loop problem

How to work with the module pattern

What the module pattern is

How to augment a module and use accessor properties

The Slide Show application with the module pattern

The HTML

The slide show library

The slide show enhancements library

The main JavaScript file

How to use the module pattern to create jQuery plugins

The structure of a plugin

How to code a plugin that highlights the items in a menu

How to add options to a plugin

A Blackjack application that uses a blackjack plugin

The HTML and the main JavaScript file

The deck and hand files of the blackjack plugin

The game file of the blackjack plugin

The main file of the blackjack plugin

How to compress and combine the files for a plugin

What’s new in ECMAScript 2015 and 2016

This PDF summarizes the new JavaScript features that became available with the ECMAScript 2015 and 2016 specifications. This makes it easy for you to add the new skills to the skillset you developed by reading Murach’s JavaScript and jQuery. Although you probably won’t want to use all of the new features, you’re sure to find a few that you’ll want to use. And after you’ve used this document for learning, it becomes a terrific on-the-job reference.

What's new PDF (335Kb) Download Now

Sample chapter

To get a better idea of how well this book works, you can download a chapter in PDF format. As you will see, the approach in this book works for programming novices as well as for experienced programmers.

Chapter 2: Getting started with JavaScript

This chapter uses two simple JavaScript applications to introduce you to the syntax and characteristics of the language. It’s designed to work for programming novices, so it starts your JavaScript training slowly. If you have programming experience, though, you’ll see how our paired-pages design and how-to headings allow you to speed through material you already know…and focus on features that are new to you. And no matter how much programming experience you have, you’ll see how the chapter exercises let you practice what you’ve learned in interesting ways.

Chapter 2 PDF (716Kb) Download Now

Book applications and exercises

This download includes:

  • The source code for the applications that are in the book
  • The starting source code for the exercises in the book
  • The solutions to the exercises in the book

Appendix A in the book shows how to install and use these files.

Exe file for Windows (12Mb) Download Now

Zip file for any system (12Mb) Download Now

Book FAQs

Below are the answers to the questions that have come up most often about this book. If you have any questions that aren’t answered here, please email us. Thanks!

What do I do if I get this error when installing Aptana Studio 3: “Failed to correctly acquire installer_nodejs_windows.msi fle: CRC error”?

This error message indicates that you don’t have a version of Node.js on your computer that is compatible with the version of Aptana that you’re installing. If you see this message, exit from the Aptana installer. Then, go to this website address to automatically download an installer file named node-v0.10.13-x86.msi: http://titanium-studio.s3.amazonaws.com/nodejs/node-v0.10.13-x86.msi. Finally, run this installer file. After that, you should be able to install Aptana without any problem.

What about ECMAScript 2015 and 2016?

Because this book focuses on the essential JavaScript and jQuery skills, it doesn’t present all of the new features that are in the ECMAScript 2015 and 2016 specifications. If you want to learn how to use those features, though, we offer a FREE PDF called “What’s new with ECMAScript 2015 and 2016” that presents all of the new features plus the Internationalization API.

This PDF is both tutorial and reference, and it’s especially designed for use with our JavaScript and jQuery book. You can get this download by going to the FREE Downloads tab.

To view the corrections for this book in a PDF, just click on this link: View the corrections

Then, if you find any other errors, please email us so we can correct them in the next printing of the book. Thank you!

There are no reviews for this product yet.

To leave a review, please log in to your account.     Log In Here

Our Ironclad Guarantee

You must be satisfied. Try our books for 60 days. They must be the best you've ever used or send them back for a prompt refund. No questions asked!

Contact Murach Books

For orders and customer service:

1-800-221-5528

Weekdays, 8 to 4 Pacific Time

College Instructors

If you're a college instructor who would like to consider a book for a course, please visit our website for instructors to learn how to get a complimentary review copy and the full set of instructional materials.