I have been working on my own JavaScript library for a long time, and everything works fine. But I was wondering about the jQuery return object.
Suppose you have multiple divs in your DOM and you select them using $("div") jquery actually returns the selected nodes (like an object / array?) In the console log and you can hover them over them to see where they are in the documents.
My object actually returns the whole object, so if you call kj("div") (where kj is my object name), it appears in the console log:
> kj > elements: Array[10] > length : 10 > more stuff
My question is: how can I get it to return something like jQuery?
Thanks in advance.
Jorik
source share