DailyJS

DailyJS

The JavaScript blog.


Tagautocomplete
Featured

jquery plugins autocomplete social

jQuery Roundup: 1.6.2 RC 1, jquery-lifestream, Better-Autocomplete

Posted on .

jQuery 1.6.2 RC 1

jQuery 1.6.2 RC 1 was
released last week. This version is a maintenance release, with bug
fixes for IE, and a long-standing animation
bug
that I ran into recently.

jquery-lifestream

jquery-lifestream (GitHub: christianv / jquery-lifestream,
License: CC Attribution 3.0 Unported) by Christian Vuerings displays a
list of activity for lots of social networks, including Twitter,
Last.fm, Pinboard, and GitHub. The author has even made a little tool
that can be used to create a
lifestream
.

Usage is straightforward:

$("#lifestream").lifestream({
  "list":[
    {
      "service": "github",
      "user": "christianv"
    },
    {
      "service": "twitter",
      "user": "denbuzze"
    }
  ]
});

Better-Autocomplete

Better-Autocomplete (License MIT and GPL) by Didrik Nordström is an autocompletion plugin that supports searching arrays, objects, and remote JSON data out of the
box:

var colors = [
    {
      title: 'Red',
      description: 'The color of the heart.'
    },

  'Yellow', // You can even mix real result objects with plain strings
  {
    title: 'Green',
    description: 'If you look at your plants, they will likely be green.'
  }
];

$('#color').betterAutocomplete('init', colors, { charLimit: 1 }, {
  select: function(result) {
    $('#color').blur();
    alert('You selected ' + result.title);
  }
});

$('#geonames').betterAutocomplete('init', 'http://ws.geonames.org/searchJSON' // ...

It makes creating "rich" result sets quite easy -- try the colours
example

to see what I mean. This plugin also has
documentation.

Although Better-Autocomplete only targets modern browsers and the author
admits IE support isn't a priority, it seems lean and well made.

Featured

jquery graphics plugins autocomplete

jQuery Roundup: jQuery 1.5.1 RC 1, betterflow.js, domsearch.js

Posted on .

jQuery 1.5.1 RC 1 Released

jQuery 1.5.1 RC 1 is out,
with over 30 bug fixes and improvements.

One fix that caught my eye was #8245: Ajax now ensures header names
are capitalized so that non-compliant xhr implementations don’t override
them
-- when writing the DailyJS
framework tutorials I noticed that jQuery had these headers in lowercase, but other implementations capitalised them.

betterflow.js

betterflow.js (MIT License) by Rui Lopes is a coverflow-inspired plugin. The betterflow.js
demo
works pretty well with
the mouse and keyboard shortcuts. It even works with horizontal
mousewheel movements, which surprised me because this is what I
instinctively tried to do when I loaded the page.

It expects some simple markup (Rui's example uses an unordered list with
divs and images), and then just a call to
\$("#example").betterflow();.

domsearch.js

domsearch.js (GitHub: juliocesar / jquery-domsearch, MIT
License) by Julio Cesar Ody makes searching elements like tables very
simple.

I've written things like this before, but with pretty basic search/sort
algorithms. This plugin uses
LiquidMetal:

Applications like Quicksilver, LaunchBar, and Launchy have made this method of keyboard entry a popular one. It's time to bring this same functionality to web controls. LiquidMetal makes scoring long strings against abbreviations easy.

Given a set of elements, domsearch can be invoked like this:

$('#search').domsearch('table#fruits', {criteria: ['td.price', 'td.weight']});

This searches on two columns in the table.

There's a lot of places where I could use this plugin, and it looks like
the LiquidMetal author (Ryan McGeary) put some effort into performance.