support both jquery and vanilla js