Yeah, looks insane, but let me explain better.
When in Jquery we use for example $(‘div’) its return an Array Collection or something like this: [div#container, div#header, div#logo], the magic thing is that Methods like push, length, pop, join, concat that are primitive methods from Array will not show you.
How can I get this behavior?? I want to return a Collection of Elements just like Jquery does but with my own methods (remove, appendHTML, and others) but not the default Array methods.
Any Ideas ??
Yeah, looks insane, but let me explain better. When in Jquery we use for
Share
Now we can declare a var like this:
And the magic is that we write in Firebug (for example):
Only the add() method will show you, but not the defaults Arrays Method (concat, push, pop…)
Any Ideas to improve this code, please post It!! or write me (please!)