Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (function(){
- var perky;
- perky = function(selector, context) {
- return new perky.trick.init(selector, context);
- };
- perky.trick = perky.prototype = {
- init: function(selector, context) {
- return this;
- },
- push: Array.prototype.push,
- splice: [].splice
- }
- perky.trick.init.prototype = perky.trick;
- window.perky = perky;
- })(window);
- $(function(){
- var x = perky();
- x.push('value');
- console.log(x);
- console.log(x.length);
- console.log(x[0]);
- });
Add Comment
Please, Sign In to add comment