I have this tag ID, pretty uncommon:
<select name="/State" id="/State">
It seems I cannot use jQuery selector $('#/State')
to select this object.
I can select it using $("#\U002FState")
, but I cannot print the id
attribute:
javascript:alert($("#\U002FState").attr('id'))
What can I do to correctly select this object?
add
\\
before/
$('#\\/State')
Additional links:
jQuery selectors: http://api.jquery.com/category/selectors/
W3C recommendation: http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier