I see people using all these different techniques with jQuery. I know the 2nd technique will run on page load. But when will the 1st and the 3rd functions fire? The third technique is used in plugins to avoid conflict right? But that will fire before page load surely? I also added a 4th technique. I would like to know when you should/shouldn't use each technique. And if any of them are bogus let me know!
1st
(function($) {
})(jQuery);
2nd
$(document).ready(function(){
});
3rd
$(function(){
}());
4th
jQuery(function($) {
});
5th
(function(){
})();