javascript - Unrecognized expression jquery in id value -


this question has answer here:

$("#1_0xr__abcdef@gmail.net__ikhhh@gmail.net__054gg")

giving me error: syntax error, unrecognized expression 1_0xr__abcdef@gmail.net__ikhhh@gmail.net__054gg

while accessible through
document.getelementbyid("1_0xr__abcdef@gmail.net__ikhhh@gmail.net__054gg")

why happening , id dynamically generated through app.

please provide me reason problem

from the doc: use of meta-characters ( such !"#$%&'()*+,./:;<=>?@[]^`{|}~ ) literal part of name, must escaped with 2 backslashes: \. example, element id="foo.bar", can use selector $("#foo\.bar").

below how you'd write selector.

$("#1_0xr__abcdef\\@gmail\\.net__ikhhh\\@gmail\\.net__054gg") 

demo


Comments

Popular posts from this blog

javascript - gulp-nodemon - nodejs restart after file change - Error: listen EADDRINUSE events.js:85 -

Fatal Python error: Py_Initialize: unable to load the file system codec. ImportError: No module named 'encodings' -

javascript - oscilloscope of speaker input stops rendering after a few seconds -