Onclick behavior

I just asked the question how to implement this.