This is more advanced use of JavaScript and its abilities
Topics Covered:
Callback functions
This example uses jQuery - for an example of Callback functions without jQuery see Lecture - Callback Functions Simple Example
http://www.youtube.com/watch?v=cHCfmL21wrs&feature=youtu.be
JSFiddle of code from Lecture - http://jsfiddle.net/reaglin/HRR6V/
http://recurial.com/programming/understanding-callback-functions-in-javascript/ - A nice little write-up of Callback functions and what they are.