Posted By

penguin999 on 04/16/09


jquery id special characters

Versions (?)

Who likes this?

1 person have marked this snippet as a favorite


Handling an ID's special characters in jQuery

 / Published in: jQuery

One must escape "special characters" in id names using two backslashes.

  1. // incorrect
  2. $('').val();
  4. // correct
  5. $('#my\\.id\\.name').val();

Report this snippet  

You need to login to post a comment.