jQuery Roundup: 1.7.2, Super Labels, jquery.textntags

07 Feb 2012 | By Alex Young | Tags jquery plugins forms
Note: You can send your plugins and articles in for review through our contact form or @dailyjs.

jQuery 1.7.2

jQuery 1.7.2 Beta 1 has been released. There are a lot of bug fixes, and some interesting API tweaks:

  • #5571: Allow chaining when passing undefined to any setter in jQuery
  • #8498: Animate hooks
  • #11119: The curCSS function needs only 2 arguments
  • #10931: Unit tests shouldn’t require Internet access

That last one is particularly useful if you need to run jQuery’s unit tests. Tests shouldn’t need a connection!

jQuery Super Labels

jQuery Super Labels (License: MIT) by Rémy Bach is a form field overlay plugin that hides labels when an input gains focus. It’ll work automatically with most text fields simply by calling $('form').superLabels(). If the label needs to be displayed in a different location, suitable options can be provided with labelLeft and labelTop.

Super Labels has advanced options for controlling animation easing and duration.

Another interesting plugin by the same author is jQuery Slash Search which will focus on a search field when / is typed.

jquery.textntags

textntags screenshot

jquery.textntags (License: MIT, GitHub: daniel-zahariev / jquery-textntags) by Daniel Zahariev is another @name input enhancement tool. A full example of it using Ajax to search looks like this:

$('textarea.tagged_text_ex2').textntags({
  onDataRequest: function(mode, query, triggerChar, callback) {
    $.getJSON('assets/data.json', function(responseData) {
      query = query.toLowerCase();
      responseData = _.filter(responseData, function(item) { return item.name.toLowerCase().indexOf(query) > -1; });
      callback.call(this, responseData);
    });
  }
});

This is an early version of the library, so the author doesn’t make any promises in terms of browser support. However, the documentation is solid and it ships with CSS, so it’s easy to drop into a project.


blog comments powered by Disqus