jQuery Tips and Tricks

This course provides an insightful look at various tips, tricks and best practices that can be used to get the most out of jQuery when building Web applications.
Course info
Rating
(428)
Level
Intermediate
Updated
Jul 18, 2013
Duration
4h 23m
Table of contents
DOM Tips and Tricks
Event Tips and Tricks
Ajax and Data Tips and Tricks
Utility Tips & Tricks
Description
Course info
Rating
(428)
Level
Intermediate
Updated
Jul 18, 2013
Duration
4h 23m
Description

jQuery provides a powerful set of features that can be used to build applications but do you know some of the key tips, tricks and best practices that can be used to reduce code, promote re-use and simplify maintenance? In the jQuery Tips and Tricks course Dan Wahlin and Elijah Manor will walk you through key tips and tricks learned over the years of building applications with jQuery. Topics covered include tips and tricks related to working with the DOM, handling and triggering events, making Ajax calls, working with and caching data locally, as well as taking advantage of built-in jQuery utility functions.

About the author
About the author

Dan Wahlin founded Wahlin Consulting, which provides consulting and training services on JavaScript, Angular, Node.js, C#, ASP.NET MVC, Web API, and Docker. He is a Google GDE, Microsoft MVP and Regional Director, and speaks at conferences and user groups around the world.

More from the author
Containerizing Angular Applications with Docker
Intermediate
1h 55m
Jul 26, 2018
Docker for Web Developers
Beginner
5h 41m
Jul 20, 2018
More courses by Dan Wahlin
About the author

Elijah Manor is a Christian and a family man. He is a Microsoft Regional Director, Microsoft ASP.NET MVP, ASPInsider, and IE userAgent and specializes in front-end web development. He enjoys blogging (http://elijahmanor.com), tweeting (@elijahmanor), and speaking about the things he learns.

More from the author
jQuery-free JavaScript
Intermediate
2h 26m
Oct 30, 2013
Fixing Common JavaScript Bugs
Intermediate
3h 42m
Aug 21, 2013
More courses by Elijah Manor
Section Introduction Transcripts
Section Introduction Transcripts

Event Tips and Tricks
Hello, this is Elijah Manor and in this module we'll be covering topics related to events in jQuery. The library has changed slightly over the years and because of that, the API has grown and changed along with it. In light of that, we will compare and contrast several methods that jQuery has that look similar, but behave very differently. In addition, we'll talk about various lesser known tips and tricks that will hopefully help you out as you add behavior to your application. In this module, we'll unpack the new on method and show how you can convert over your existing bind methods. In the same way, we'll look at how you can convert your live and delegate methods to use the new on method as well. From there, we'll talk about event delegation and explain what it means to alter propagation and reject default behavior. Then we'll look at how you can namespace your event handlers so that later you could easily remove only the handlers that you added and not accidentally remove other handlers. Then we'll proceed to look at how we can actually register event handlers before the DOM is even ready. This is a nice trick that not many developers realize you can do. Then we'll look at how you can reuse an existing method to double as an event handler. Sometimes this can be an issue, but there's a quick fix to resolve the frustration. Then we'll look at how you can easily create a custom event and use it in your application. Then we'll look at the event object and figure out what the user was doing when they triggered the event. Next, we'll look at how to determine if an event was triggered by user interaction or if it was triggered programmatically. And then finally, we'll look into a technique that you could use to delay initialization until it's needed and we'll call this Just-in-Time Initialization.

Utility Tips & Tricks
Hello, this is Elijah Manor and in this module we'll focus on several utility methods that jQuery has that I've found to be very helpful when making web applications. In this module, we'll focus on the map method and explain how it could be useful to manipulate a raise. We'll also look at the grep method, which could be useful to help filter down results. The type method provides some nicer feedback when you're trying to figure out what type of object you're dealing with. We'll discuss a little bit about feature detection and why it's important and then we'll briefly mention the Callbacks object, which seems to be one of those hidden features that not many people know about. We'll also talk about the noConflict method and discuss when you might need to use it and how. And finally, we'll look at the extend method, which you'll find used a lot in making jQuery plugins, but it's also handy in other scenarios as well.