javascript eventlistener instead of jquery and environment css added