a js function for clicking