Last active
December 15, 2015 23:38
-
-
Save elclanrs/5341331 to your computer and use it in GitHub Desktop.
This file contains 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
var jQuery = (function jQueryClass(win, doc) { | |
var AP = Array.prototype; | |
function jQuery(selector) { | |
this.el = this._init(selector); | |
this.length = this.el.length; | |
} | |
function $(selector) { | |
return new jQuery(selector); | |
} | |
jQuery.prototype = { | |
_init: function(selector) { | |
return AP.slice.call(doc.querySelectorAll(selector)); | |
} | |
}; | |
return win.$ = $; | |
}(window, document)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment