COMisHARD COMisHARD - 7 months ago 40
Javascript Question

Correct way to set webkit value with javascript

I can normally use the syntax: = someValue

Such as: = "20px"

But the following bugs because of the "-" = "initial"

What is the correct way to handle this?

Answer['-webkit-user-select'] = 'initial';

In JavaScript, and foo['bar'] are equivalent. If the former would cause a syntax error, you can always fall back on the latter.