This question already has an answer here:
- What does this JQuery instruction do $(function(){…}) [duplicate] 1 answer
In Jquery, I understand that
$()
is there to select an element and when you do something like
$(".foo").click(function(){})
will execute function when foo class is clicked..
but when you do,
$(function(){})
does this mean you are selecting a function? it doesn't seem right to me..