Add on click to javascript file