How does lib jQuery do? Example:
$ (element) .text ('my text');
I want to know how to do a function like text()
in pure JavaScript, just to learn the theory. I want to know how the html element is passed as a parameter to the text()
function, which makes innerText
in the same element encapsulated by the $()
function.
I want to know how the text()
function recognizes in which element it should add the text only being joined to $()
with a (.)
??
I just use jQuery, but my will is to learn the pure JS in depth.