(short musical sting)…- Now let's take a look at my solution…to this plugin challenge.…First, let's just get the suspense out of the way…and look at the little bug that was in the plugin.…Here I am, still in that start version before modifying it.…I'm going to reload the page and everything seems fine,…but if I switch to my editor,…I'm going to try to chain something onto this,…and lo and behold, nothing happens.…Chaining was the thing that was broken.…
Now, let's open up the solution files…and take a look there.…Here is my invocation of the plugin,…and I have a num_displayed option that I'm passing in.…Let's load this in the browser.…Here it is, and I can reload it,…and I see four ads,…and they change in content and in order.…Almost every time I reload the page.…Switching back, I can confirm that chaining works…by adding on something after the plugin is invoked.…
Reload that, and there we go.…Great. Let's take a look…at the plugin itself and see what changed.…Here we are.…I've turned num_displayed and ads_sources into options.…
- 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.