Most functions in jquery return a jquery object which contains a set of elements. html
doesn't know the arguments of $()
exactly, it's more that the result of $()
has a set of elements which are created based on the parameter passed to $()
.
In your example of funcA
and funcB
though, you could easily have funcA
return an object which has a function named funcB
. This object could also contain the value passed to funcA
and then a call to funcB
could "know" that value as well.
http://jsfiddle.net/ScENm/