Niko Niko - 1 year ago 87
jQuery Question

jquery doesn't work with string variables

is this a bug or expected? (google Chrome Screenshot)

When I use the hard-coded String, it works, but when I use the same string in a variable, it doesn't. I'm using JSF if this is relevant somehow.

enter image description here

Answer Source

The variable contains a string with two backslashes in it, but when you type out the string yourself, you're typing a string with only one backslash in it. (Typing \\ in a quoted string results in one \, since the backslash is an escape character.)

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