switch end intervention to jquery