Learning from JQuery
O'Reilly Media, Inc, USA (Verlag)
978-1-4493-3519-9 (ISBN)
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
Callum Macrae is a professional JavaScript developer based in the UK. He regularly contributes JavaScript related patches to open source projects, including phpBB and the Hex IRC bot. When not coding or writing, he spends most of his time drumming or playing the piano.
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
Erscheint lt. Verlag | 12.3.2013 |
---|---|
Verlagsort | Sebastopol |
Sprache | englisch |
Maße | 178 x 233 mm |
Gewicht | 205 g |
Einbandart | Paperback |
Themenwelt | Mathematik / Informatik ► Informatik ► Programmiersprachen / -werkzeuge |
Informatik ► Web / Internet ► JavaScript | |
ISBN-10 | 1-4493-3519-5 / 1449335195 |
ISBN-13 | 978-1-4493-3519-9 / 9781449335199 |
Zustand | Neuware |
Haben Sie eine Frage zum Produkt? |
aus dem Bereich