add javascript code to example