- In the course of your plugins execution,…certain things will happen…and there may be times when you'd like to…respond to those different events…that happen in your plugin…and allow other people to change…what happens when those events take place.…The way you can do that is by using callbacks.…Let's take a look at a simple example…of how that might work.…So, here in the ads plugin,…got these three ads and,…let's say I'd like to know when each ad has loaded…and be able to check when all of them have loaded.…
First, we'll take a look here at the plugin itself.…So, here at the top of the plugin,…along with the other default options,…I've added this onAdloaded option,…which is currently set to jquery .noop.…This is just an alias for…an anonymous function with nothing in it.…It's just a shorter way to say the same thing…when you're using jquery.…So, the idea here, is that by default,…when an ad loads, nothing happens.…But, just adding this option doesn't do anything.…This function needs to be called…when the actual thing happens.…
- Writing basic jQuery filters
- Converting filters to plugins
- Converting code to plugins
- Making plugins configurable
- Adding appearance options and functions
- Distributing jQuery plugins
Skill Level Intermediate
1. Foundations of jQuery Plugins
2. Writing Your First Plugin
3. Diving Deeper with a Complex Plugin
4. Advanced Topics
Wrapping up3m 17s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.