Tag Archives: JQuery

Command Chaining: From JQuery to Swing

JQuery is my favorite Javascript library for developing web-based applications. One of the things I really like is the ability chain commands together to reduce the code size. Here is an example from JQuery to hide and add an event handler to an HTML element.

$(document).ready(function() {
   $('#faq').find('dd').hide().end().find('dt').click(function() {
     $(this).next().slideToggle();
   });
 });

Inspired by the JQuery, I started to use the same command chaining technique in my Swing programs and libraries. I been spending some time developing an animation library designed with command chaining at the core.
READ MORE »