As in this screencast ( http://www.youtube.com/watch?v=h0uZIljjElo ), I think I often see jQuery syntax being used to wrap and define functions that don’t benefit from jQuery. E.g.:
<script>
$(function() {
// some code to run at load time
});
</script>
It would be shorter to write the code without the 2nd and 4th lines. Is there some value in writing after this fashion?
This statement is a document ready statement, which is basically saying “Please don’t run any of the code inside this block until the DOM is ready to be manipulated.”