-1

What's the name of this pattern please?

I'm planning to research it after finding out its name... however, if you like you are welcome to explain what it does.

(function($) {


      //code


            })(jQuery);
thanks_in_advance
  • 2,603
  • 6
  • 28
  • 44
  • This question has your answer, friend! http://stackoverflow.com/questions/6004129/document-ready-shorthand –  Nov 11 '14 at 00:19
  • $(function() { ... }); is document ready shorthand... OP's question is the immediately invoked function expression – Tomanow Nov 11 '14 at 00:23

2 Answers2

1

Immediately Invoked Function Expression is what you are looking for.

Tomanow
  • 7,247
  • 3
  • 24
  • 52
0

Are you referring to the self-executing anonymous function?

i.e. http://markdalgleish.com/2011/03/self-executing-anonymous-functions/

boxsome
  • 178
  • 5
  • 1
    Also known as [**Immediately-Invoked Functions Expressions**](http://stage.learn.jquery.com/javascript-101/functions/) – PeterKA Nov 11 '14 at 00:24