I have seen this (I'm also using it):

```
$(document).ready(function(){
   // do jQuery
})

```

and also this (I have tried lately):

```
(function(){
   // do jQuery
})(jQuery)

```

both work fine.

What is the difference of the two (except on how it looks)?

Which one is more proper to use?