How do I put a variable in a string in JavaScript?
Example:
$(\'#contactForm\').animate({\"marginLeft\": \"+=680px\"}, \"slow\");
I wou
As with most languages that don't have sigals, you can't perform interpolation, you have to concatenate multiple strings.
"foo" + "bar" + "baz" "foo" + string_var + "baz" "+=" + string_var + "px"