3
How does jQuery lib? 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 function text()
, that makes the innerText
in the same element encapsulated by the function $()
.
I want to know how the function text()
recognizes in which element it should add the text only being joined to the $()
with a point (.)
?
I only use jQuery, but my will is to learn pure JS in depth.
http://answall.com/q/81128/129, http://answall.com/questions/14968/como-crea-um-plugin-para-a-fun%C3%A7%C3%a3o-do-jquery/14975? s=1|1.1881#14975, http://answall.com/a/500/129,
– Sergio
I have the impression that this question has more to do with implementation than with method chaining, which is what you have in the other question. It would be good for the author to read the post indicated, and [Edit] the post here explaining better the points of interest that there do not charge, qq way.
– Bacco