Add onload behavior for #24

Make the onload behavior from the rails gem available for the main library. This is useful for people who don't use gems to manage static assets.