Skip to content

Instantly share code, notes, and snippets.

@juliocesar
Created December 29, 2008 02:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save juliocesar/41145 to your computer and use it in GitHub Desktop.
Save juliocesar/41145 to your computer and use it in GitHub Desktop.
(function($) {
$.stuff = function(bitoftext) {
this.bitoftext = bitoftext;
}
$.extend($.stuff, {
report: function() { alert(this.bitoftext) }
})
})(jQuery);
// So you can go
// $.stuff("var i'm passing to the constructor")
// $.stuff.report()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment