Product Overview
Simply JavaScript
Table Of Contents
- Here’s a look at the table of contents:
- Preface
- Who Should Read this Book?
- What’s Covered in this Book?
- The Book’s Web Site
- The Code Archive
- Updates and Errata
- The SitePoint Forums
- The SitePoint Newsletters
- Your Feedback
- Acknowledgments
- Kevin Yank
- Cameron Adams
- Conventions Used in this Book
- Code Samples
- Tips, Notes, and Warnings
- 1. The Three Layers of the Web
- Keep ’em Separated
- Three Layers
- HTML for Content
- CSS for Presentation
- JavaScript for Behavior
- The Right Way
- JavaScript Libraries
- Let’s Get Started!
- 2. Programming with JavaScript
- Running a JavaScript Program
- Statements: Bite-sized Chunks for your Browser
- Comments: Bite-sized Chunks Just for You
- Variables: Storing Data for your Program
- Variable Types: Different Types for Different Data
- Conditions and Loops: Controlling Program
Flow
- Conditions: Making Decisions
- Loops: Minimizing Repetition
- Functions: Writing Code for Later
- Arguments: Passing Data to a Function
- Return Statements: Outputting Data from a Function
- Scope: Keeping your Variables Separate
- Objects
- Unobtrusive Scripting in the Real World
- Summary
- 3. Document Access
- The Document Object Model: Mapping your
HTML
- Text Nodes
- Attribute Nodes
- Accessing the Nodes you Want
- Finding an Element by ID
- Finding Elements by Tag Name
- Finding Elements by Class Name
- Navigating the DOM Tree
- Interacting with Attributes
- Changing Styles
- Changing Styles with Class
- Example: Making Stripy Tables
- Finding All Tables with Class
dataTable - Getting the Table Rows for Each Table
- Adding the Class
altto Every Second Row - Putting it All Together
- Finding All Tables with Class
- Exploring Libraries
- Prototype
- jQuery
- Dojo
- Summary
- The Document Object Model: Mapping your
HTML
- 4. Events
- An Eventful History
- Event Handlers
- Default Actions
- The
thisKeyword - The Problem with Event Handlers
- Event Listeners
- Default Actions
- Event Propagation
- The
thisKeyword - The Internet Explorer Memory Leak
- Putting it All Together
- Example: Rich Tooltips
- The Static Page
- Making Things Happen
- The Workhorse Methods
- The Dynamic Styles
- Putting it All Together
- Example: Accordion
- The Static Page
- The Workhorse Methods
- The Dynamic Styles
- Putting it All Together
- Exploring Libraries
- Summary
- 5. Animation
- The Principles of Animation
- Controlling Time with JavaScript
- Using Variables with
setTimeout - Stopping the Timer
- Creating a Repeating Timer
- Stopping setInterval
- Using Variables with
- Revisiting Rich Tooltips
- Old-school Animation in a New-school Style
- Path-based Motion
- Animating in Two Dimensions
- Creating Realistic Movement
- Moving Ahead
- Revisiting the Accordion Control
- Making the Accordion Look Like it’s Animated
- Changing the Code
- Exploring Libraries
- script.aculo.us
- Summary
- 6. Form Enhancements
- HTML DOM Extensions
- Example: Dependent Fields
- Example: Cascading Menus
- Form Validation
- Intercepting Form Submissions
- Regular Expressions
- Example: Reusable Validation Script
- Custom Form Controls
- Example: Slider
- Exploring Libraries
- Form Validation
- Custom Controls
- Summary
- HTML DOM Extensions
- 7. Errors and Debugging
- Nothing Happened!
- Common Errors
- Syntax Errors
- Runtime Errors
- Logic Errors
- Debugging with Firebug
- Summary
- 8. Ajax
XMLHttpRequest: Chewing Bite-sized Chunks of Content- Creating an
XMLHttpRequestObject - Calling a Server
- Dealing with Data
- Creating an
- A Word on Screen Readers
- Putting Ajax into Action
- Seamless Form Submission with Ajax
- Exploring Libraries
- Prototype
- Dojo
- jQuery
- YUI
- MooTools
- Summary
- 9. Looking Forward
- Bringing Richness to the Web
- Easy Exploration
- Easy Visualization
- Unique Interaction
- Rich Internet Applications
- Widgets
- JavaScript Off the Web
- Exploring Libraries
- Dojo
- Google Web Toolkit
- Summary
- Bringing Richness to the Web
- A. The Core JavaScript Library
- The Object
- Event Listener Methods
- Script Bootstrapping
- CSS Class Management Methods
- Retrieving Computed Styles
- The Complete Library
- Index
ebook only
Instant Download!
This title available in Adobe PDF, Kindle (mobi) and ePub (IOS) formats



