jQuery - object and function at same time?

javascript, jquery

Solution

Functions are objects in JavaScript so they can have properties.

`$` is the jQuery object, when using `$()` it is used as a constructor (it contains some magic so `new` is not necessary); but it also contains lots of methods (and some non-callable properties such as `$.browser`) available as `$.something`

Problem

I'm just developing my own mini framework for an application I was working on, and I've been studying the jQuery is coded. I get the way $(selector).function() works, but how come you can call some functions such as: $.ajax() Surely this would been the dollar symbol references both a function and the jquery.fn object at the same time? Thanks in advance!

Original source