jQuery Plugin Roundup 17

27 Jul 2010 | By Alex Young | Tags jquery plugins ui internationalization

Welcome to the jQuery Plugin Roundup, episode 17. Remember you can send your plugins in for review through our contact form or @dailyjs.

Awesomecomplete

Awesomecomplete by Clint Tseng (demo) is an autocomplete plugin that attempts to address common problems with similar plugins. The author says it’s better because:

It’s an autocomplete plugin that works against multiple fields, with a pretty powerful and flexible search algorithm … JavaScript is a dynamically typed language that’s trivially easy to reflect against. Why should I care what you give me? Just give me a list of whatever JavaScript model objects you use.

Usage looks like this:

$('#element').awesomecomplete({
  noResultsMessage: '<p>No results found.</p>',
  staticData: [ // whatever ],
  valueFunction: function(dataItem) {
      return dataItem['name'] + ' <' + dataItem['email'] + '>';
  }
});

As you can see, the valueFunction does what the quote says.

I think the author’s idea of making this more data-driven and reflective does make it better than the other autocomplete plugins I’ve used.

password123

password123 by Timmy Willison (MIT and GPL) helpers create an iPhone-like password field, with $('input:password').password123();. It’s simple, looks nice, and might work for your next HTML5-rich-UI app.

If you’re not familiar with the iPhone, the demo explains the effect.

Coincidentally, when this plugin was sent to me the WebKit autofill data vulnerability was announced. So I saw “Safari… password” in the email and got worried. It turned out to be one of those strange coincidences!

jsperanto

jsperanto (MIT) by Jean-Philippe Joyal helps handle translation in JavaScript templates. It reminds me of other internationalisation APIs, so you might be familiar with the API already (he says it’s like i18n in Rails):

$.jsperanto.init(function(t){
  t('project.name'); //-> "jsperanto"
  $.t('project.store'); //-> "JSON"
  $.t('can_speak',{count:1}); //-> "I can only speak one language"
  // and so on

The author has checked the script with JSLint and written unit tests, and carefully namespaced everything. It seems like a pretty solid project.


blog comments powered by Disqus