Customer Service 1-800-221-5528

Murach’s jQuery (2nd Edition)

by Zak Ruvalcaba and Anne Boehm
16 chapters, 596 pages, 230 illustrations
Published August 2015
ISBN 978-1-890774-91-2
List price: $54.50

Today, jQuery is used in over 60% of the one million most-visited websites, and that makes it one of the technologies that every web developer should master. The problem is that jQuery is difficult to learn, even for those with programming experience. But now, this new edition of our jQuery book makes it as easy as possible for students to learn how to use jQuery... at a thoroughly professional level.

Buy this book

You are currently on the Murach site for instructors. To buy this book, please visit our retail site.

Your books are so good that I threw away my assigned JavaScript and jQuery book for my class and bought Murach’s JavaScript and jQuery (which has, by the way, helped restore my 4.0 GPA)."

Blaine Simcox, Student, Michigan

  • About this Book
  • Table of Contents
  • Courseware
  • FAQs
  • Corrections

What this book does

This book is divided into five sections. After your students complete the first two sections, you can proceed with any of the other sections, in any order that works best for your course.

Section 1: The least your students need to know about JavaScript to get the most from jQuery

To get your students off to the right start, section 1 presents a crash course in the JavaScript skills that are needed for using jQuery. Although you can’t use jQuery without these JavaScript skills, most jQuery books don’t include them. The trouble is that some students may not have these JavaScript skills, even if they’ve already taken a JavaScript course.

At the least, this section is a good refresher to ensure that all your students have the same set of core JavaScript skills. This section is also a useful reference when your students don’t remember some of the JavaScript skills they need for using jQuery as they work through the other sections of this book.

Section 2: The core jQuery skills for every web developer

In this section, your students will learn how to use jQuery to create JavaScript applications like image swaps, collapsible panels, slide shows, user-friendly forms…and more.

To begin, chapter 5 presents the jQuery selectors, methods, and event methods that are used the most. Then, the next four chapters build on that base as they focus on effects and animations, the many plugins that are available for jQuery, how to create your own plugins, forms and data validation, and DOM manipulation and traversal. When your students complete this section, they can go on to any of the three sections that follow.

Section 3: Use jQuery UI to enhance web pages and save development time

The jQuery UI (User Interface) library helps you build common but useful features into a website...with just a few lines of code. So this section shows your students how to use jQuery UI to create widgets like tabs, accordions, and datepickers...interactions like draggable, droppable, and sortable...and effects like color and class transitions.

Section 4: Speed up response times and add content feeds with Ajax and JSON

Ajax and JSON can be used to get data from a server and add it to a web page without reloading the entire page, and that can significantly improve response times for users. Although the JavaScript coding for this can be mind-bending, jQuery provides methods that make it far more manageable.

So in this section, your students will learn how to use jQuery with Ajax and JSON to deliver data to your websites. First, they’ll learn the basics. Then, they’ll learn how to work with the APIs for websites like Flickr and Google Maps to add popular content to their pages. Last, this section shows how to use HTML5 APIs like Web Storage and Web Workers to enhance Ajax applications.

Section 5: Mobile websites made easier with jQuery Mobile

This section shows how to use jQuery Mobile to develop web pages for mobile devices with the look-and-feel of native applications. For large, established sites, this is a practical alternative to responsive web design. And there’s no better way to develop mobile websites than using jQuery Mobile.

What courses this book can be used for

This book is designed specifically for a jQuery course. If you page through a review copy of this book, we think you’ll see why we believe it is the best book for a jQuery course. In short, it presents all of the features of jQuery, jQuery UI, and jQuery Mobile that are commonly used on the job. And it does that in a way that’s designed to make learning quick and interesting.

Related books for related courses

Murach’s JavaScript is designed for a one- or two-term JavaScript course. It is also designed to work seamlessly with Murach’s jQuery in two-course progression from JavaScript to jQuery.

Similarly, Murach’s HTML5 and CSS3 is designed for a Web Design or Web Development course. And it is designed to work seamlessly in a three-course progression from HTML5 and CSS3 to JavaScript to jQuery. If you use all three of our books for these courses, you can be sure your students will have the skills they need on the job.

What's new in this edition

Most important, we updated this book to jQuery 2.0 and fixed the problems that resulted from the changes in version 1.9, which was released after the first edition was published.

Beyond that, we:

  • Changed the title from Murach’s JavaScript and jQuery to just Murach’s jQuery to better reflect the content emphasis.
  • Condensed section 1 on JavaScript from 6 to 4 chapters because we wanted to focus on just the JavaScript skills that are needed for using jQuery.
  • Dropped the content on Blogger, YouTube, and Twitter because those APIs have been changed so they are no longer easy to access.
  • Added content on HTML5 APIs like Web Storage and Web Workers as they become more prominent.
  • Upgraded, improved, and expanded content throughout to make it more thorough and understandable.

What software your students need

To develop JavaScript and jQuery applications, your students need:

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

Although your students can use any text editor with this book, a text editor that includes syntax coloring and auto-formatting will help them 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 code (as well as HTML and CSS code), and it runs on both Windows and Mac OS.

To test a web page, your students can use their default browsers. But we recommend that they also test their pages in Chrome, which includes terrific developer tools. Again, these browsers are available for free.

To help your students install these products on their own systems, Appendix A provides the procedures that they’ll need. In addition, chapter 1 presents a short tutorial on using Aptana, and chapter 4 shows how to use Chrome for debugging.

What people say about this book

“This is a must-have book for anyone wanting to master web development front-end UI work (HTML3/CSS3/JavaScript/JQuery). Currently I’m in the corporate consulting world, but I have taught in universities, corporate training and vocational schools. Hats off to Murach and the JQuery authors: Zak Ruvalcaba & Anne Boehm.”
- Michael Thomas, posted at Amazon

“I have several books which include jQuery, but this separate devoted jQuery book lets you get a better understanding right from the beginning. The text, examples, descriptions, and even the layout all bring you an ease of use that is missing in other books. I highly recommend this book, particularly for beginners through intermediate learners.”
- Chris Wallace, Denver Visual Studio User Group

“If you're an experienced JavaScript/jQuery developer, you will still pick up some nice tidbits (I know I did).”
- Philip F. Japikse, Cincinnati .Net Users Group

“This is a must-have reference book for the web application developer. It is concise and complete as it references JQuery, JQuery UI and JQuery Mobile. For a student or someone new to JQuery, this text makes learning easy.”
- Eric Notheisen, Enterprise Developers Guild

View the table of contents for this book in a PDF: Table of Contents (PDF)

Click on any chapter title to display or hide its content.

Section 1 JavaScript essentials for jQuery users

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 and jQuery are used for client-side processing

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 rule sets

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 A JavaScript subset for jQuery users

The basics of JavaScript

How to include JavaScript in an HTML document

How to code JavaScript statements

How to create identifiers

How to use primitive data types to work with data

The primitive data types

How to code numeric expressions

How to work with numeric variables

How to work with string and Boolean variables

How to use objects to work with data

How to use objects, methods, and properties

How to use the window and document objects

How to use Textbox and Number objects

How to use Date and String objects

How to code control statements

How to code conditional expressions

How to code if statements

How to code while, do-while, and for loops

How to work with arrays

How to create and use arrays

How to use for loops to work with arrays

How to use functions

How to create and call a function

When and how to use local and global variables

How to attach an event handler to an event

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

The Future Value application

The HTML and CSS

The JavaScript

Chapter 3 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 Email List application

The HTML

The JavaScript

The FAQs application

The HTML and CSS

The JavaScript

DOM scripting skills for 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

Chapter 4 How to test and debug a JavaScript or jQuery application

An introduction to testing and debugging

Typical test phases for a JavaScript application

The three types of errors that can occur

Common JavaScript errors

How top-down coding and testing can 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 debug in Internet Explorer

How to trace the execution of your JavaScript code

How to view the source code

When and how to validate the HTML

Section 2 jQuery essentials

Chapter 5 Get off to a fast start with jQuery

Introduction to jQuery

What jQuery is

How jQuery can simplify JavaScript development

How jQuery UI and plugins 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 6 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 7  How to create and use jQuery plugins

Introduction to plugins

How to find jQuery plugins

Some of the most useful plugins

How to use any plugin

How to use three of the most useful 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

How to create your own plugins

The structure of a plugin

How to code a plugin that highlights menu items

How to add options to a plugin

A web page that uses two plugins

The user interface

The script elements

The HTML for the elements used by the plugins

The jQuery for using the highlightMenu plugin

Chapter 8  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

How to use a plugin for data validation

How to use the validation plugin

The options and default error messages for the validation plugin

A Validation application that uses the validation plugin

The user interface

The HTML

The CSS

The jQuery

Chapter 9 How to use the DOM manipulation and traversal methods

The DOM manipulation methods

The methods for working with attributes

The methods for DOM replacement

The methods for DOM insertion and cloning

The methods for DOM wrapping and removal

The TOC application

The user interface and HTML

The jQuery

The methods for working with styles and positioning

The methods for working with styles

The methods for positioning elements

The enhanced TOC application

Two event methods used with DOM manipulation

How to use the on and off event methods

An Employee List application that uses the on method

The HTML for the application

The jQuery for the application

The DOM traversal methods

The tree traversal methods

The filtering methods

A Slide Show application that uses DOM traversal methods

Section 3 jQuery UI essentials

Chapter 10 Get off to a fast start with jQuery UI themes and widgets

Introduction to jQuery UI

What jQuery UI is and where to get it

The jQuery UI components

How to build and use a jQuery UI download

How to build a download

How to use ThemeRoller to build a custom theme

How to use the downloaded folders and files

How to use jQuery UI widgets

How to use any widget

How to use the Accordion widget

How to use the Tabs widget

How to use the Button and Dialog widgets

How to use the Autocomplete widget

How to use the Datepicker widget

How to use the Slider widget

How to use the Menu widget

A web page that uses jQuery UI

The user interface

The link and script elements

The HTML for the widgets

The jQuery for the widgets

Chapter 11 How to use jQuery UI interactions and effects

How to use interactions

Introduction to interactions

How to use the draggable and droppable interactions

How to use the resizable interaction

How to use the selectable interaction

How to use the sortable interaction

How to use effects

Introduction to effects

How to use individual effects

How to use color transitions

How to use class transitions

How to use visibility transitions

Section 4 Ajax, JSON, and APIs

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

Chapter 13 How to use the API for Google Maps

Introduction to Google Maps

Introduction to the Google Maps API

The classes for adding a Google map to a web page

The script element for the Google Maps API

How to add a Google map to a web page

How to display markers on a map

The classes and methods for geocoding and markers

How to create an address list that displays markers

How to display messages on a map

The classes and methods for messages and markers

How to add messages to markers

How to add custom messages to markers

How to add Flickr images to messages

How to display driving directions on a web page

The classes and methods for directions and listeners

How to display driving directions with a map

Chapter 14 How to use the HTML5 APIs

An introduction to the HTML5 APIs

Common HTML5 APIs

How to get information about an HTML5 API

How to use the Geolocation API

How Geolocation works

How to show a user’s position on a Google map

How to handle Geolocation errors

How to use the Web Storage API

How to use local storage

How to use session storage

How to use the Web Workers API

How the Web Workers API works

How to use a web worker to retrieve data using Ajax

An application that uses a web worker and web storage

The user interface

The HTML

The JSON data

The jQuery code

Section 5 jQuery Mobile

Chapter 15 Get off to a fast start with jQuery Mobile

How to work with mobile devices

How to provide pages for mobile devices

How to use a JavaScript plugin to redirect mobile browsers to a mobile website

How to set the viewport properties

Guidelines for designing mobile web pages

Guidelines for testing mobile web pages

How to get started with jQuery Mobile

What jQuery Mobile is and where to get it

How to include jQuery Mobile in your web pages

How to create one web page with jQuery Mobile

How to code multiple pages in a single HTML file

How to use dialogs and transitions

How to create buttons

How to create a navigation bar

How to format content with jQuery Mobile

How to work with the default styles

How to apply themes to HTML elements

How to use ThemeRoller to roll your own theme

A mobile website for Vecta Corp

The layout of the website

The HTML for the mobile website

The style sheet for the mobile website

Chapter 16 How to enhance a jQuery Mobile website

How to use the jQuery Mobile documentation

The demos for jQuery Mobile

The data attributes of jQuery Mobile

The events, methods, and properties of jQuery Mobile

How to use jQuery Mobile to format content

How to lay out content in grids

How to use collapsible content blocks

How to use collapsible sets

How to use jQuery Mobile for list views

How to use basic lists

How to use split button lists and inset lists

How to use list dividers and count bubbles

How to use jQuery Mobile for forms

How to use text fields and text areas

How to use sliders and switches

How to use radio buttons and check boxes

How to use select menus

How to submit a mobile form

An enhanced mobile website for Vecta Corp

The layout of the website

The HTML

The style sheet

If you aren’t already familiar with the supporting courseware that we provide for a book, please go to About our Courseware. As you will see, our courseware consists of the end-of-chapter activities in the book, the files in the student download at our retail site, and the instructor’s materials. These components provide everything that other publishers provide, in a way that delivers better results.

If you are familiar with our courseware, here’s a quick summary of the courseware for this book. For a detailed description in PDF format, please read the Instructor’s Summary.

End-of-chapter activities in the book

  • Term lists
  • Chapter summaries
  • Practice exercises

Student download at our retail site

  • HTML, CSS, JavaScript, and jQuery source code for all the applications that are presented in the book
  • Starting source code for the exercises in the book
  • Solutions to the book exercises

Appendix A in the book gives your students complete instructions for downloading and installing these items on a PC or Mac.

Instructor’s materials

  • Instructional objectives by chapter
  • PowerPoint slides for classroom presentations
  • Test banks in multiple formats
  • Additional chapter exercises that aren’t in the book, plus their solutions
  • Short exercises that aren’t in the book that can be used for added practice, quizzes, or tests, plus their solutions
  • The files that students can download at our retail site: (1) the book applications, (2) starting points for the exercises in the book, and (3) solutions to the exercises in the book

To view the "Frequently Asked Questions" for this book in a PDF, just click on this link: View the questions 

Then, if you have any questions that aren't answered here, please email us. Thanks!

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!

Murach college books and courseware since 1974