change addEventlisener to jquery function