My example works just fine in Netscape, Internet Explorer, Mozilla and Opera. Tedster already explained why you need those single quotes escaped.
Why would you think that. They are contained within a string and have no special meaning within a string. You only need to escape a character if it has a special meaning but you want the literal character instead of this special behavior.
" and ' are special in that they are used to delimit string literals. If you use ' as a delimiter and want to use it within the string as a literal character you need to escape it.
var x = 'Aaron\'s Party'
It would have been easier to use double quotes as the delimiter since the single quote has no specuial meaning within a double quoted string.
var x = "Aaron's Party"
Why? Double quotes have no special meaning with in a string literal delimited by single quotes. Forward slashes are just ordinary characters. There is no need to escape them.
Be careful with quotes [webbuilder.netscape.com]