Event handlers don't need to be in document.onready.  Fix undefined usage.  Add example page.