I have the following HTML element:
<input type="checkbox" name="ctl00$ContentPH$ucFuncionEdit1$ckEsMenu" />
How can I select all elements with the same name using jQuery, the following fails:
jQuery('[name=ctl00$ContentPH$ucFuncionEdit1$ckEsMenu]');
The previous line of code raise the following error:
Error: Syntax error, unrecognized expression:
[name=ctl00$$ContentPH$$ucFuncionEdit1$$ckEsMenu]
You quote the value:
When dealing with attribute selectors, it’s best to always quote the value (although if the value is a single word containing only the letters A-Z [case insensitive] and the digits 0-9 [but not starting with a digit], you can get away without).