Skip to content

Instantly share code, notes, and snippets.

@sarfraznawaz2005
Last active October 12, 2015 18:30
Show Gist options
  • Save sarfraznawaz2005/aa1a172c200f8c842708 to your computer and use it in GitHub Desktop.
Save sarfraznawaz2005/aa1a172c200f8c842708 to your computer and use it in GitHub Desktop.
Adding jQuery magic to custom objects
function Foo(n) {
this.Name = n;
}
$.extend( Foo.prototype, new jQuery.Interface, { // more prototype methods } );
// Foo preserves .constructor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment