- Now, at this point, we have…a gallery with all these captions,…just like we want them.…Nothing's really changed…from the original filter that we wrote.…If we're gonna use this as a plugin,…it makes sense to extend it…and make it a little more configurable…via some options.…Let's switch back over to the code and take it from there.…Back in the HTML document, I've reset this…so it works on all the images…just the way we want it to.…And then in the plugin itself,…here's where we are.…
There's different ways that you can approach…adding options to your plugin.…The first is to look at what you're doing…and look for opportunities…where something could conceivably be changed…if you're using it in a different context…than the one in which you originally wrote it.…Here I could see wanting to change this class.…I could also see wanting to change these tags,…like the div or span tags…used for the wrapper…and the caption.…Then, also, the classes that are used on those tags.…
We can set up a series of options…to allow those to be configurable.…
- 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.