Backslash is the escape character for a JavaScript string, e.g. alert( 'a\'b' === "a'b" ); // true
So when you use \. you're merely escaping the "." in the string - in other words the \ does nothing in this case. When you use \\ then the first \ escapes the second one and you get the \ in the string. Try these: alert( '#test2.3' ); #test2.3 alert( '#test2\.3' ); #test2.3 - same as above alert( '#test2\\.3' ); #test2\.3 - finally what you want -Mike > From: spinn...@vip.hr > > I believe that it will function as intended if you escape the > dot, like so: > $("#test2\.3") > > although I've tried now in Firebug and it seems you have to > escape the slash too, like so (don't know why, is it because > of Firebug, or?): > $("#test2\\.3")