maxlength plugin
It's a fairly common design pattern to want to limit the number of characters the user can input in a field whilst giving feedback to the user on how much they have left. So I've built a little jQuery plugin to do the work for me.
It's a fairly common design pattern to want to limit the number of characters the user can input in a field whilst giving feedback to the user on how much they have left. So I've built a little jQuery plugin to do the work for me.
As with most projects I work on, there's normally some JavaScript interaction. Often, however I've got all kinds of different versions of jQuery going on in these projects so when I try to access the latest functionality, and it groaks, I'll go sniffing around to check if it's the latest version. Never again!
I'm always writing quick prototypes of ideas I've got, and often they'll include some quick jQuery. However, for reasons unbeknownst to me, about 1/3 of the time I forget to wrap the statements in a .ready() function, and since I have the habit of putting my script tags in the head - the code never fires. [...]
After lots of great feedback, I've upgraded the jQuery Tag Suggest Plugin. This post covers the fixes and upgrades.
JavaScript behaviours are roughly defined as an event handler that is set once, then handled by elements that are created on the fly later on. For example, if I have a list of links referencing images which are loaded inline, adding an removing the links from this list would not require me to re-hook the event [...]
Inline form validation is the way forward with any web site today, and I've found I've been able to extract this process out in to a simple plugin that can be applied anywhere throughout my code using the the following pattern.
If you're familiar with del.icio.us you will be familiar with the tag suggesting as-you-type support. The reason why, I believe, the tagging works so well within del.icio.us is that it helps you create a subset of tags that you commonly use for different types of links. This way, it makes it easier to find tagged [...]