I’d like to set vendor styles with Javascript, something like this:
elem.style.mozBorderRadius = '5px';
Is this possible? If so, how?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can check for and set it like this:
You can do this for webkit as well while you’re at it as well using
webkitBorderRadius, like this:Make sure to wrap it in an
if()like I have above, so it doesn’t error in browsers that don’t support it.