I have a select with id: param0.typeParameter.
I try to get it with jquery with:
$('#param0.typeParameter');
i get nothing but if it use this
document.getElementById('param0.typeParameter');
that work
To make jQuery select element with ID param0.typeParameter instead of element with ID param0 and class name typeParameter you should use the following:
$('#param0\\.typeParameter');
To use any of the meta-characters ( such as
!"#$%&'()*+,./:;<=>?@[\]^``{|}~) as a literal part of a name, it must be escaped with with two backslashes:\\. For example, an element withid="foo.bar", can use the selector$("#foo\\.bar").
You can try this instead:
$('[id="param0.typeParameter"]');
Or else the code assumes you want to select an element with id param0 and class typeParameter
jQuery uses the CSS-selector language. Which causes "#param0.typeParameter" to be interpretted as an element with id param0 and class typeParameter.
The jQuery statement is more similar to:
document.querySelector("#param0.typeParameter");
idname. Dot are used to define a class