Thread:Mathmagician/@comment-3508190-20120504092551/@comment-4674838-20120509023124

Can you elaborate on what the difference is between a method and a function in jQuery lingo? My previous understanding coming from C++ or Java style programming is that a "method" or "instance method" is a member function within a class in OOP -- whereas a "function" may or may not be part of a class.

It kinda looks to me like that's what's happening in your example above, with log in $('body').log; being a member function acting on some object, whereas the log in $.log('body'); is printing out "body" to the console but it's not actually an instance method of any particular class.

I still haven't wrapped my mind around $ or $. notation. What exactly is the $ symbol? Is it only really used for jQuery? So if I see JavaScript with $ in it, should I automatically assume I'm looking at jQuery code?