COMisHARD COMisHARD - 1 year ago 113
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 Source['-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.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download