Anonymous Functions

Anonymous Functions

Hey Guys, I am learning about functions in jQuery, and have a question about anonymous functions.

I am just not sure what exactly the purpose of using them, in context with the code.

Are they used to get the DOM elements of the page?

For example in the code what is the difference between this

  1.            
    $( "a" ).click(function() {
    // this refers to an anchor DOM element
    });                             

and this

  1.            
    $( "a" ).click(this refers to an anchor DOM element);

Thanks for you help in advance!