Modify examples to appendChild instead of use alert