The text function performs some preparations on the input nodes, and then performs a callback provided by the user (your function), and passes these two arguments (which were prepared on "some preparations") to your callback. If you need the exact code, you can read the jQuery source.
Tommi source share