[jQuery] correct way to quote strings
Hi,
I am writing a server program that updates a page according to the
current state on the server by sending down jquery commands to be
evaluated.
http://gitorious.org/projects/hunchncells
At the moment, the server is generating strings like this...
$("s").html("
<input name='s' value='val' type='text' id='s'>
</input>");
These are failing, I think because the single quotes need to be
backslashed. I'm a bit of a javascript newbie and wondered if there
are any similar issues I should be aware of when generating javascript
on the fly.
Cheers,
Andy