I had a thought to do something like this:
(function(window, undefined){
$ = window.jQuery;
$(function(){
// Do some stuff
});
})(this);
Would you consider this good practice or bad? Does it have any implications for when jQuery(document).ready() would fire?
Only reason I’d say would be if you have some javascript to run before the DOM is ready, and you don’t want to pollute the global namespace.