change ontabclick to pass event