Simple jQuery Plugin
(function($) { $.fn.foo = function() { this.each(function() { var $el = $(this); $el.append('Foo Bar'); }); return this; }; }(jQuery));