Update example.js

Added Document ready