Saturday, March 28, 2015

til: jquery $(document).ready shorthand

Oh, huh. Since I've know jQuery, I've used the formulation:

  //do something

but in going over some jQuery UI example, I found out

  //do something

is a more concise replacement, that also waits for the DOM to be loaded.

Here's a pretty decent summary page including some other options.

No comments:

Post a Comment