Move event element to separate directive