handling clicks on the attr