- Let's take a look at my solution…to this plug-in challenge.…You can find it in chapter two…and in the folder O2O5.…So loading this file up in the browser,…if I start typing in any of these fields…you can see that the limit fields all update.…This is great.…Let's switch over to the HTML and take a look.…So here we are, I've broken the plug-in…into its own file called jquey.show_char_limit.js.…This jquery.pluginname.js is a very common…pattern you'll see in jQuery plug-ins,…but of course, you can name it anything you like.…
So here I'm just using a selector…that picks out all text areas…and this underscore text field class,…which is how I've selected the one input field.…Currently it's the only one that has this,…but if there were more it would cover all of them.…And then I'm invoking this show_char_limit method.…And just to make sure it's clear that…not only does the plug-in work, chaining also works,…let's add on a method here.…We'll add on our old friend the CSS method.…This time we'll pass in an object…and set the background color to black…
- 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.