Click event snippet