Obscure javascript usages — resolved

Passing an anonymous function to the jQuery master(?) function:

$(function() {
// your function, listeners, etc
Here’s what it means: run this function once the DOM has been initialized. This is the earliest that the js could be expected to run without odd results. This is the equivalent of:
$( document ).ready(function() {
// Handler for .ready() called.

Leave a Reply