This course will become read-only in the near future. Tell us at community.p2pu.org if that is a problem.

Lesson 1 - Getting user input; manipulating DOM


Hello everybody, and welcome to the first week's lesson!  Please watch the following videos and read the source code of the accompanying examples.

  1. Video 1.0 - About the Course; Contents of Lesson 1
  2. Video 1.1 - Review of the DOM (Document Object Model); basic concepts of event handling; using jQuery.  (This whole video will probably be review for you if you've done any significant DOM manipulation and/or jQuery programming.)
  3. Example 1.1 - changing color, size, and position of a <div> using jQuery in response to button clicks.
  4. Video 1.2 - Delving deeper into event handling; handling events in a cross-browser way
  5. Example 1.2 - Getting the x and y location of mouse up and mouse down events
  6. Example 1.3 - Timers
  7. Video 1.4 - Functional programming.  A bit of theory for the week: what is a function, anyway?  Functions as first-class objects; anonymous callback functions; functional programming.  Understanding at a deep level how functions and closures work, and mastering functional programming techniques, will help make you a much better programmer!

Task Discussion