I have the HTML code
<input id="info[text1]" type="text" value="1"/> <br>
<input id="info[text2]" type="text" value="2"/> <br>
I want to select id='info[text1]'
using jquery but I can't, so can you help me?
You have to escape the brackets with \\
$("#info\\[text1\\]")
see http://api.jquery.com/category/selectors/ (second paragraph)
Try it this way.
$('input[id="info[text1]"]')
Try this:
$('#info\\[text1\\]');
http://jsfiddle.net/UwrVn/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With