InformIT.com

Teach Yourself jQuery & JavaScript in 24 Hours (Learning Lab)

 

Author: Brad Dayley
Publisher: Sams Publishing
ISBN: 978-0-13-392759-7
Copyright © 2014 by Pearson Education, Inc.

Contents at a Glance

Introduction

Part I: Introduction to jQuery and JavaScript Development

Hour 1: Intro to Dynamic Web Programming

Hour 2: Debugging jQuery and JavaScript Web Pages

Hour 3: Understanding Dynamic Web Page Anatomy

Hour 4: Adding CSS/CSS3 Styles to Allow Dynamic Design and Layout

Hour 5: Jumping into jQuery and JavaScript Syntax

Hour 6: Understanding and Using JavaScript Objects

Part II: Implementing jQuery and JavaScript in Web Pages

Hour 7: Accessing DOM Elements Using JavaScript and jQuery Objects

Hour 8: Navigating and Manipulating jQuery Objects and DOM Elements with jQuery

Hour 9: Applying Events for Richly Interactive Web Pages

Hour 10: Dynamically Accessing and Manipulating Web Pages

Hour 11: Accessing Data Outside the Web Page

Part III: Building Richly Interactive Web Pages

Hour 12: Enhancing User Interaction Through Animation and Other Special Effects

Hour 13: Interacting with Web Forms

Hour 14: Creating Advanced Web Page Elements

Part IV: Advanced Concepts

Hour 15: Accessing Server-Side Data via AJAX

Hour 16: Interacting with External Services, Facebook, Google, Twitter, and Flickr

Part V: jQuery UI

Hour 17: Introducing jQuery UI

Hour 18: Using jQuery UI Effects

Hour 19: Advanced Interactions Using jQuery UI Interaction Widgets

Hour 20: Using jQuery UI Widgets to Add Rich Interactions to Web Pages

Part VI: jQuery Mobile

Hour 21: Introducing Mobile Website Development

Hour 22: Implementing Mobile Web Pages

Hour 23: Formatting Content in Mobile Pages

Hour 24: Implementing Mobile Form Elements and Controls


Introduction

With billions of people using the Internet today, there is a rapidly growing trend to replace traditional websites, where pages link to other pages with a single page, with applications that have richly interactive elements. The main reason for this is that users have become less patient with clicking, waiting, and then having to navigate back and forth between web pages. Instead, they want websites to behave more like the applications they are used to on their computers and mobile devices.

In fact, in just the next 24 hours, millions of new web pages will be added to the Internet. The majority of these pages will be written in HTML, with CSS to style elements and with JavaScript to provide interaction between the user and back-end services.

As you complete these 24 one-hour lessons you will gain a practical understanding of how to incorporate JavaScript with the powerful jQuery library to provide rich user interactions in your web pages. You will gain the valuable skills of adding dynamic code that allows web pages to instantly react to mouse clicks and finger swipes, interact with back-end services to store and retrieve data from the web server, and create robust Internet applications.

Each hour-long lesson provides fundamentals that are necessary to create professional web applications. The Learning Lab includes some basics on using HTML and CSS to get you started, even if you’ve never used them before. You are provided with code examples that you can implement and expand as your understanding increases. In fact, in just the very first lesson you create a dynamic web page using jQuery and JavaScript.

So pull up a chair, sit back, and enjoy the ride of programming rich Internet applications with jQuery and JavaScript.

Beyond jQuery and JavaScript

This Learning Lab covers more than jQuery and JavaScript because you need to know more than the language structure to create truly useful web applications. The goal is to give you the fundamental skills needed to create fully functional and interactive web applications in just 24 short, easy lessons. This Learning Lab course covers the following key skills and technologies:

  • HTML is the most current recommendation for web page creation. Every example in this book is validated HTML5, the most recent recommended version.
  • CSS is the standard method for formatting web elements. You not only learn how to write CSS and CSS3, but also how to dynamically modify it on the fly using jQuery and JavaScript.
  • JavaScript is the best method to provide interactions in web pages without the need to load a new page from the server. This is the standard language on which most decent web applications are built.
  • jQuery, jQueryUI, and jQueryMobile are some of the most popular and robust libraries for JavaScript. jQuery provides very quick access to web page elements and a robust set of features for web application interaction. jQuery provides additional UI and mobile libraries that provide rich UI components for traditional web applications as well as mobile web applications.
  • AJAX is the standard method that web applications use to interact with web servers and other services. The book includes several examples of using AJAX to interact with web servers, Google, Facebook, and other popular web services.

Code Examples

Most of the examples in this course provide the following elements:

  • HTML code—Code necessary to provide the web page framework in the browser.
  • CSS code—Code necessary to style the web page elements correctly.
  • JavaScript code—This includes both the jQuery and JavaScript code that provide interactions among the user, web page elements, and web services.
  • Figures—Most of the examples include one or more figures that illustrate the behavior of the code in the browser.

The examples are basic to make it easier for you to learn and implement. Many of them can be expanded and used in your own web pages. In fact, some of the exercises at the end of each hour have you expand on the examples.

All the examples have been tested for compatibility with the latest version of the major web browsers, including Google’s Chrome, Microsoft’s Internet Explorer, and Mozilla’s Firefox.

Special Elements

As you complete each lesson, margin notes help you immediately apply what you just learned to your own web pages.

Whenever a new term is used, it is clearly explained. No flipping back and forth to a glossary!

Tip

Tips and tricks to save you precious time are set aside in Tips so that you can spot them quickly.

Note

Notes highlight interesting information you should be sure not to miss.

Caution

When there’s something you need to watch out for, you’ll be warned about it in a Caution.

Q&A, Quizzes, and Exercises

Every hour ends with a short question-and-answer session that addresses the kind of “dumb questions” everyone wants to ask. A brief but complete online quiz lets you test yourself to be sure you understand everything presented in the hour. Finally, one or two optional exercises give you a chance to practice your new skills before you move on.

About the Author

Brad Dayley is a senior software engineer with more than 20 years of experience developing enterprise applications. He has used HTML/CSS, JavaScript, and jQuery extensively to develop a wide array of web pages, ranging from enterprise application interfaces to sophisticated, rich Internet applications, to smart interfaces for mobile web services. He is the author of Python Phrasebook and jQuery and JavaScript Phrasebook.

Acknowledgments

I’d like to take this opportunity to thank all those who made this title possible. First, thanks to my wonderful wife and boys for giving me the inspiration and support I need. I’d never make it far without you.

Thanks to Mark Taber for getting this title rolling in the right direction, Russell Kloepfer, for keeping me honest with his technical review, Barbara Hacha, for turning the technical ramblings of my brain into a fine text, and Tonya Simpson, for managing everything on the production end and making sure the book is the finest quality.

We Want to Hear from You!

As our customer, you are our most important critic and commentator. We value your opinion and want to know what we’re doing right, what we could do better, what areas you’d like to see us publish in, and any other words of wisdom you’re willing to pass our way.

We welcome your comments. You can email or write to let us know what you did or didn’t like about this Learning Lab course —as well as what we can do to make our products better.

Please note that we cannot help you with technical problems related to the topic of this product.

When you write, please be sure to include this product's ’s title and author as well as your name and email address. We will carefully review your comments and share them with the author and editors who worked on the book.

Email:    feedback@samspublishing.com

Mail:      Sams Publishing
               ATTN: Reader Feedback
               800 East 96th Street
               Indianapolis, IN 46240 USA

Reader Services

Visit our website and register this product at informit.com/register for convenient access to any updates, downloads, or errata that might be available for this product.