Jquery event support

Small change, switching the addEventListener for a jquery `on` event listener if the library is detected.