Made click event configurable