I have the following element which is generated by some struts code which I am unable to change.
<input type="hidden" name="versions[0].elements[0].description">
I would typically use something like $('input[name=XXX]');
However as my name has special characters I need to be able to escape it. Any ideas?
Thanks
W
You just need to wrap the name variable in quotes, like this:
Example fiddle
You don’t need to escape in this case the attribute value is treated by jQuery internally as a string literal.