Why can a string like "{opacity: 1.0, width: '132px'}" not be evaluated using eval() as is?
Because {opacity: 1.0, width: '132px'}
is invalid javascript as-is. Try putting this statement as-is and you will get a js error. On the other hand v = {opacity: 1.0, width: '132px'}
is valid javascript.