Learning from jQuery
Building on Core Skills
Год: 2013
Автор: Callum Macrae
Издательство: O'Reilly Media
ISBN: 978-1-4493-3519-9
Язык: Английский
Формат: PDF/EPUB
Качество: Изначально компьютерное (eBook)
Интерактивное оглавление: Да
Количество страниц: 116
Описание:If you’re comfortable with jQuery but a bit shaky with JavaScript, this concise guide will help you expand your knowledge of the language—especially the code that jQuery covers up for you. Many jQuery devotees write as little code as possible, but with some JavaScript under your belt, you can prevent errors, reduce overhead, and make your application code more efficient.This book explores event handling, prototypes, and working with the DOM and AJAX through examples and lots of code. You’ll learn common conventions and patterns in JavaScript and—if you’ve never coded with JavaScript before—a tutorial will take you through the basics.Enhance your jQuery code by using object constructors and prototypes
Reduce overhead and gain more control by handling events with JavaScript
Work with the DOM much faster with JavaScript than you can with jQuery
Send a few AJAX requests without having to load the entire jQuery library
Understand the importance of JavaScript code standards, comments, code reuse, and anti-patterns
Enlist JavaScript resources, such as a good IDE, a syntax checker, and version control
Chapter 1 : Event Handling
Listening for Events
Event Propagation
Triggering Events
Removing Event Handlers
Adding a "Once Only" Event Listener
Summary
Chapter 2 : Constructors and Prototypes
Constructors
Prototypes
Summary
Chapter 3 : DOM Traversal and Manipulation
Selecting an Element
Selecting Children
Selecting the Next Element
Creating an Element
Modifying an Existing Element
Cycling Through Elements
Moving and Copying Elements
Summary
Chapter 4 : AJAX
Sending an AJAX Request
Debugging
Sending POST Requests in JavaScript
Writing a Wrapper Function
A Simple Application of AJAX
Designing a Site with AJAX
Summary
Chapter 5 : JavaScript Conventions
Writing JavaScript
Literals Notation
Optimizations
Functions
Code Reuse
Common Antipatterns
Common Design Patterns
Summary
Appendix : JavaScript Basics
Hello World!
Comments
Variables
Numbers
Functions
Objects
Finding the Type of a Variable
Arrays
Looping
Conditional Statements
Delays
Regular Expressions
Error Handling
Summary
Appendix : JavaScript Resources
A Good IDE
GitHub
JSHint
JSPerf
Mozilla Developer Network
Pastebins
Version Control Software
Colophon