changed eventlistener to jquery instead of javascript