jQuery Enlightenment | by Cody Lindley | 1st Edition | based on jQuery 1.3.2
A book for jQuery developers who have surpassed the introductory concepts
2000+ copies sold!
$15 PDF book (123 pages)
Have a discount code?
or
Need a bulk license, $100 for up to 100 people
Color ($45) or B&W; ($30) hard copies from lulu.com
jQuery Enlightenment was written to express, in short-order, the concepts essential to intermediate and advanced jQuery development. Its purpose is to instill in you, the reader, practices that jQuery developers take as common knowledge. Each chapter contains concepts essential to becoming a seasoned jQuery developer.
This book is intended for three types of readers. The first is someone who has read introductory books on jQuery and is looking for the next logical step. The second type of reader is a JavaScript developer, already versed in another library, now trying to quickly learn jQuery. The third reader is myself, the author. I crafted this book to be used as my own personal reference point for jQuery concepts. This is exactly the type of book I wish every JavaScript library had available.
Why buy this
- 10% of all sales will go back to the jQuery project
- Written by a jQuery developer for developers
- 100+ code examples all (well, mostly all) linked to JS BIN
- Color reinforced coding examples
- Small digestible concepts supported with real code ready to run in your favorite web browser
- Perfect reference book for quick access to jQuery concepts
- You already rock at JavaScript or another library and need a quick start guide to jQuery
- No cruft just real code and enough words to stay out of the way of grokking the concepts
- You need to spread jQuery across your organization (Bulk license, $100 up to 100 people)
What People Are Saying
Ben Alman (benalman.com) says:
"If you understand HTML and CSS but are relatively new to JavaScript, jQuery Enlightenment will definitely get you going in the right direction, and then some. And for somewhat more advanced users, the book covers the basics of plugin authoring, performance improvement techniques, and AJAX functionality." (source)
Dan Wellman (danwellman.co.uk) says:
"I found the book very easy to read, with a strong focus on practical code interspersed with succinct descriptions. There wasn’t too much theory or too many complex examples – the perfect blend of theory and practice." (source)
Doug Neiner (fuelyourcoding.com) says:
"jQuery Enlightenment is an amazingly clear montage of principals and code samples every jQuery developer needs to know grouped by topic. Cody covered topics both basic and profound throughout the pages of the book." (source)
Eric Martion (ericmmartin.com) says:
"Whether you are a new jQuery users, or a seasoned jQuery developer, jQuery Enlightenment won't disappoint!" (source)
Jeffery Way (nettuts.com) says:
"To prove how much I enjoyed reading this book: I received my review copy on a Wednesday, and finished it the next day. As I'm sure many of you are aware, tech books and front to back reads very rarely go well together. This is a testament to the "no fluff" aspect I referenced earlier." (source)
linkmango says:
"JQuery Enlightenment by Cody Lindley is one of the best books on #jquery out there. Its a must have for anyone doing web development." (source)
Samuli Hakoniemi says:
"I just finished reading "jQuery Enlightenment" (by Cody Lindley) and I can recommend it to everyone who's dealing with #jQuery" (source)
James Padolsey says:
"For those of you who are looking to take that next step in your steady uptake of the jQuery library, I can absolutely recommend Cody Lindley’s latest creation, "jQuery enlightenment"! It's a breath of fresh air to be honest!" (source)
Nathan Smith says:
"Little did I know that my eyes would be opened, not only to new depths in jQuery, but the JavaScript language itself. Truly, an enlightening experience indeed. While I consider myself proficient at JavaScript, Cody is a luminary – deriving value from the slightest code nuances" (source)
Jonathan D. Baker says:
"I want to drop a quick thanks and tell you how much I appreciate your book. It's chock-full of quality content and no filler, and I'd love for more web-based tutorial books to follow your lead. Cheers!"
Ben Nadel says:
"A style like this could have easily been disastrous; but, Cody's jQuery code was so clear and well commented that with just a few lines, he was able to, in the most simple way, fully demonstrate the feature in question." (source)
Kyle Bradshaw says:
"Really digging jQuery Enlightenment, the use of JSBin throughout is A++" (source)
Adam Thody says:
"Learning some new stuff, also great as a reference guide" (source)
Marty Glynn says:
"I really like this and I think you're setting a new standard with posting code on jsBin"
Carl Thien says:
"Lulu does a great job. The binding is pro - just like any other computer book. The paper is good quality semi-gloss, and the color looks good. The size is 8" x 12" and the gutter close to the binding is large, so you don't have to crack down the center of the book to read all the text. The font-size is not tiny. I am very satisfied and can tell you that you can safely recommend to others buying your book using lulu.com"
A peek inside the book
About the author
Cody Lindley is a Christian, husband, son, father, brother, outdoor enthusiast, and client-side engineer. Since 1997 he has been passionate about HTML, CSS, JavaScript, Flash, Interaction Design, Interface Design, and HCI. He is most well known in the jQuery community for the creation of Thickbox, a modal/dialog solution. In 2008 he officially joined the jQuery team as an evangelist. His current focus has been on client-side optimization techniques as well as speaking and writing about jQuery. As of late he is employeed by Ning.com
About the technical editors
Paul Irish is a front-end developer, user-experience designer, and emerging interactions consultant at Molecular. He has created rich experiences for clients such as Reebok, Adidas, Boost Mobile, Finish Line, and Monster.com. He has written a few jQuery plugins, including idleTimer and Infinite Scroll. You can find him helping n00bz on the #jquery IRC channel or writing about JavaScript and jQuery at PaulIrish.com.
Nathan Smith has been building websites since late last century. He enjoys hand coding HTML, CSS, and JavaScript. He works as a UX developer at Fellowship Tech, and holds a Master of Divinity degree from Asbury Theological Seminary. He started Godbit, a community resource aimed at helping churches and ministries make better use of the web. He also created the 960 Grid System, a framework for sketching, designing, and coding page layouts. Nathan blogs semi-regularly at his personal site SonSpring.
Jonathan Sharp is a standards driven freelance web designer and developer and founder of Out West Media LLC. With experience in both front-end and back-end technolgoies he brings value in integration delivering a seamless user experience. Jonathan has also developed a number of jQuery plugins such as jdMenu, jdNewsScroll and positionBy. Prior to freelancing, Jonathan worked for Union Pacific Railroad, CSC and Motorola, Inc. in Chicago after helping found Imprev, Inc. in Bellevue, WA in early 2000. He lives in Nebraska with his wife, Erin, and their daughter Noel. When not working he enjoys spending time with his family, playing with their dogs, and riding off into the sunset on Micah, his draft horse.
Jonathan Snook moves effortlessly from client-side, front-end work to hardcore server-side challenges, and his fluency in CSS, JavaScript, PHP and MySQL makes him the "turn-to" man for many high-profile clients. Co-author of Accelerated DOM Scripting and The Art and Science of CSS, he writes regularly at his popular blog Snook.ca, and for Sitepoint. Jonathan also works with his partners at Sidebar Creative, makers of world-class websites and innovative applications.
Jörn Zaefferer is a member of the core jQuery team. Along his work on jQuery itself, he wrote and maintains several of the most popular jQuery plugins. Jörn works as a consultant for Maxence Integration Technologies GmbH in Cologne, Germany, where he architects and develops Java-based web applications for Maxence's customers and Maxence's own products.
Table of contents
- Preface
- jQuery semantics
- How the book is structured
- More code, less words
- Why Oh Why did I use alert() for code examples?
- Color coding
- Completely grok jQuery text() before reading this book
- What is JS Bin and why do code examples use it?
- Chapter 1 - Core jQuery
- Base concept behind jQuery
- The concept, behind the concept, behind jQuery
- How to check the current jQuery version
- jQuery requires HTML run in standards mode or almost standards mode
- Include all CSS files before including jQuery
- Using a hosted version of jQuery
- Executing code when the DOM is ready, but before window.onload
- Executing jQuery code when the browser window is completely loaded
- Execute jQuery code when DOM is parsed, without using ready()
- Use the $ alias without fear of conflicts
- Grokking jQuery chaining
- Breaking the chain with destructive methods
- Using destructive jQuery methods and exiting destruction using end()
- The jQuery function is multifaceted
- Grokking when the keyword this refers to DOM elements
- Extract elements from a wrapper set use them directly without jQuery
- Checking to see if the wrapper set is empty
- Creating an alias by renaming the jQuery object itself
- Using .each() when implicit iteration is not enough
- Elements in jQuery wrapper set returned in document order
- Determining context used by the jQuery function
- Create an entire DOM structure, including DOM events, in a single chain
- Chapter 2 - Selecting
- Custom jQuery filters can select elements, when used alone
- Grokking the :hidden and :visible filter
- Using the is() method to return a boolean value
- You can pass jQuery more than one selector expression
- Determining anything is selected by checking wrapper set .length
- Create your own custom filters for selecting elements
- Differences between filtering by numeric order vs. DOM relationships
- Selecting elements by id when the value contains meta-characters
- Stacking selector filters
- Nesting selector filters
- Grokking the :nth-child() filter
- Selecting elements by searching attribute values using regular expressions
- Difference between selecting direct children vs. all desendants
- Selecting direct child elements when a context is already set
- Chapter 3 - Traversing
- Difference between find() and filter() methods
- Passing filter() a function instead of an expression
- Traversing up the DOM
- Traversing methods accept CSS expressions as optional arguments
- Chapter 4 - Manipulation
- Creating, operating, and adding HTML on the fly
- Grokking the index() method
- Grokking the text() method
- Update or remove characters using a regular expression
- Grokking the .contents() method
- Using remove() does not remove elements from wrapper set
- Chapter 5 - HTML Forms
- Disable/enable form elements
- How to determine if a form element is disabled or enabled
- Check/uncheck a single checkbox or radio button
- Check/uncheck multiple checkboxs or radio inputs
- Determining if a checkbox or radio button is checked or unchecked
- How to determine if a form element is hidden
- Setting/getting the value of an input element
- Setting/getting the selected option of a select element
- Setting/getting the selected options of a multi-select element
- Setting/getting text contained within a textarea
- Setting/getting the value attribute of a button element
- Editing select elements
- Selecting form elements by their type
- Selecting all form elements
- Chapter 6 - Events
- Not limited to a single ready() event
- Attaching/removing events using bind() and unbind()
- Programmatically invoke a specific handler via short event methods
- jQuery normalizes the event object
- Grokking event namespacing
- Grokking event delegation
- Applying event handlers to DOM elements regardless of DOM updates using live()
- Adding a function to several event handlers
- Cancel default browser behavior with preventDefault()
- Cancel event propagation with stopPropagation()
- Cancel default browser behavior and event propagation via return false
- Create custom events and trigger them via trigger()
- Cloning events as well as DOM elements
- Using Firebug to reveal/inspect events attached to DOM elements
- Getting X and Y coordinates of the mouse in the viewport
- Getting X and Y coordinates of the mouse relative to another element
- Chapter 7 - jQuery and the web browser
- Disable right-click contextual menu
- Scrolling the browser window
- Chapter 8 - Plugins
- Use the $ alias when constructing a plugin
- New plugins attach to jQuery.fn object to become jQuery methods
- Inside a plugin, this is a reference to the current jQuery object
- each() is used to iterate over the jQuery object and provide a reference to each element in the object using the this keyword
- Typically a plugin returns the jQuery object so jQuery methods or other plugins can still be chained after using a plugin
- Default plugin options
- Custom plugin options
- Overwrite default options without altering original plugin code
- Create elements on the fly, invoke plugins programmatically
- Providing callbacks and passing context
- Chapter 9 - Performance best practices
- Use the latest and greatest version of jQuery
- Passing the jQuery function a context can improve query performance
- Grokking selector performance
- Cache sets of selected elements that are used more than once
- Keep DOM changes to a minimum
- Optimize by passing jQuery methods a key/value object
- Optimize by passing multiple selectors to the jQuery function
- Optimize by leveraging chaining
- Use the native for loop when dealing with big loops
- Apply visual changes via ID and Class vs. manipulating style properties
- Chapter 10 - Effects
- Disable all jQuery effect methods
- Grokking the stop() animation method
- Determine if an element is animating using :animated
- Using show(), hide(), and toggle(), without animation
- Grokking sequential and non-sequential animations
- Animate() is the base low-level abstraction
- Grokking the jQuery fading methods
- Chapter 11- AJAX
- The jQuery ajax() function is the lowest-level abstraction
- jQuery supports cross-domain JSONP
- Stop a browser from caching XHR requests
- Chaper 12 - Miscellaneous concepts
- Storing data on DOM elements
- Adding new functions to the jQuery namespace
- Computing an element's attribute value
- Should I use CSS properties or JavaScript references?
- Accessing an iframe's content
- Leverage a jQuery plugin for Flash embedding
- Pre-loading images
- Pre-loading assets using XHR
- Add a class to as a CSS hook for JavaScript enabled browsers
Q & A
- Q: What is a bulk license?
- A: A bulk license is purchased by an organization that would like to distribute the pdf book to its employees (Bulk license, $100 up to 100 people).
Copyright©
This publication is protected under the US Copyright Act of 1976 and all other applicable international, federal, state and local laws, and all rights are reserved, including resale rights: you are not allowed to give or sell this book to anyone else. If you received this publication from anyone other than jqueryenlightment.com, you've received a pirated copy.