If you are new to jQuery you will notice that almost everything is wrapped with
What does it do? It check if all HTML tags are loaded and if so, execute your code. Easy as that. But if you are new to jQuery it’s really strange way of writing JS code :).
Did you know that this is not so required?
Hope this will be handy for someone.