directive click function to change image