Skip to content

Instantly share code, notes, and snippets.

@jerodsanto
Created August 11, 2010 19:12
Show Gist options
  • Select an option

  • Save jerodsanto/519547 to your computer and use it in GitHub Desktop.

Select an option

Save jerodsanto/519547 to your computer and use it in GitHub Desktop.
(function($) {
var thisIsPrivate = function(number) {
console.log("this can only be called from inside this scope", number);
}
var soIsThis = 4;
$.Model.extend('MyModel',
/* static */
{
},
/* prototype */
{
thisIsPriveleged: function() {
console.log("this can access the private members");
thisIsPrivate(soIsThis);
}
})(jQuery);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment