Preface
Many developers are comfortable with using the jQuery library, which adds features to JavaScript and makes a lot of tasks easier, but they are slightly less confident when using JavaScript without jQuery. This could be because they donât like the syntax of JavaScript and so try to avoid writing pure JavaScript as much as possible, or it could just be because theyâre hoping that theyâll never have to work on a project where they canât use jQuery. Whatever the reason, this can result in the parts of their code that arenât using jQuery being inefficient or incorrect.
If any of this sounds like you, then this book provides an opportunity for you to expand your knowledge of the bits of JavaScript that jQuery covers up for you. In the first four chapters, weâll cover event handling, prototypes, working with the DOM, and AJAX. Chapter 5 is about conventions in JavaScript, and covers some common conventions and patterns in JavaScript. There are also two appendixes: Appendix A aims to teach JavaScript to someone who has never written it without jQuery before, and Appendix B highlights some useful tools that you can use to aid you when coding.
You can find all the major functions from this book, such as the AJAX and event functions, and some additional code samples, on this GitHub repo.
Who This Book Is For
This book is targeted at developers who know jQuery, but who donât yet feel confident in their JavaScript knowledge or would just like to know more. You donât need to know everything there is to know about jQuery, as Iâll be explaining what something does if it isnât already obviousâfor example, I wouldnât explain what .fadeIn()
does, as it is descriptive enough that it doesnât require explanation.
Who This Book Isnât For
This book assumes a basic knowledge of jQuery, and I wouldnât recommend reading it if you have no experience in JavaScript or jQuery. If that describes you, I would recommend finding a basic JavaScript book such as Michael Morrisonâs Head First JavaScript, David Sawyer McFarlandâs JavaScript and jQuery: The Missing Manual, or Shelley Powersâs Learning JavaScript. For a more comprehensive exploration, try David Flanaganâs JavaScript: The Definitive Guide.
While it certainly wonât hurt, this book wasnât written for you if you already consider yourself fairly good with JavaScript, and you may not learn much. You wonât have covered everything in the book (especially in Chapter 5), but a lot of it will likely be material you already know.
Conventions Used in This Book
The following typographical conventions are used in this book:
- Italic
- Indicates new terms, URLs, email addresses, filenames, and file extensions.
-
Constant width
- Used for program listings, as well as within paragraphs to refer to program elements such as variable or function names, databases, data types, environment variables, statements, and keywords.
-
Constant width bold
- Shows commands or other text that should be typed literally by the user.
-
Constant width italic
- Shows text that should be replaced with user-supplied values or by values determined by context.
Tip
This icon signifies a tip, suggestion, or general note.
Warning
This icon indicates a warning or caution.
Using Code Examples
This book is here to help you get your job done. In general, if this book includes code examples, you may use the code in this book in your programs and documentation. You do not need to contact us for permission unless youâre reproducing a significant portion of the code. For example, writing a program that uses several chunks of code from this book does not require permission. Selling or distributing a CD-ROM of examples from OâReilly books does require permission. Answering a question by citing this book and quoting example code does not require permission. Incorporating a significant amount of example code from this book into your productâs documentation does require permission.
We appreciate, but do not require, attribution. An attribution usually includes the title, author, publisher, and ISBN. For example: âLearning from jQuery by Callum Macrae (OâReilly). Copyright 2013 Callum Macrae, 978-1-449-33519-9.â
If you feel your use of code examples falls outside fair use or the permission given above, feel free to contact us at permissions@oreilly.com.
Safari® Books Online
Note
Safari Books Online is an on-demand digital library that delivers expert content in both book and video form from the worldâs leading authors in technology and business.
Technology professionals, software developers, web designers, and business and creative professionals use Safari Books Online as their primary resource for research, problem solving, learning, and certification training.
Safari Books Online offers a range of product mixes and pricing programs for organizations, government agencies, and individuals. Subscribers have access to thousands of books, training videos, and prepublication manuscripts in one fully searchable database from publishers like OâReilly Media, Prentice Hall Professional, Addison-Wesley Professional, Microsoft Press, Sams, Que, Peachpit Press, Focal Press, Cisco Press, John Wiley & Sons, Syngress, Morgan Kaufmann, IBM Redbooks, Packt, Adobe Press, FT Press, Apress, Manning, New Riders, McGraw-Hill, Jones & Bartlett, Course Technology, and dozens more. For more information about Safari Books Online, please visit us online.
How to Contact Us
Please address comments and questions concerning this book to the publisher:
OâReilly Media, Inc. |
1005 Gravenstein Highway North |
Sebastopol, CA 95472 |
800-998-9938 (in the United States or Canada) |
707-829-0515 (international or local) |
707-829-0104 (fax) |
We have a web page for this book, where we list errata, examples, and any additional information. You can access this page at: http://oreil.ly/Learning_jQuery
To comment or ask technical questions about this book, send email to bookquestions@oreilly.com.
For more information about our books, courses, conferences, and news, see our website at http://www.oreilly.com.
Find us on Facebook: http://facebook.com/oreilly
Follow us on Twitter: http://twitter.com/oreillymedia
Watch us on YouTube: http://www.youtube.com/oreillymedia
Acknowledgments
Thank you to David DeMello, Eric Hamilton, Cody Lindley, and Ralph Whitbeck, the technical reviewers without whom this book wouldnât be half what it is now. Thanks also to my editors, Meghan Blanchette and Simon St.Laurent, and everyone else at OâReilly Media.
A massive thanks to all the folks at webdevRefinery for motivating me to write this book in the first place.
Finally, Iâd like to thank John Resig and everyone else who has contributed to the wonderful jQuery library. Without jQuery, I would be stuck spending half my time debugging Internet Explorer issues!
Get Learning from jQuery now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.