rewrite jquery to vanilla js