Last active
October 12, 2015 18:30
-
-
Save sarfraznawaz2005/aa1a172c200f8c842708 to your computer and use it in GitHub Desktop.
Adding jQuery magic to custom objects
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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