boilerplate js for jquery plugin authoring
// replace 'foo' with the name of the plugin, etc
(function($){
$.fn.foo = function(opts) {
var settings = $.extend({}, $.fn.foo.defaults, opts);
return this.each(function() {
var $this = $(this);
// plugin code here...
});
};
$.fn.foo.defaults = {
bar : "baz"
};
}(jQuery));