Hi,
In HTML:
<select name=site[new][fw][version]></select>
In jQuery, I've tried:
var fwvs=$('select[name=site\\[new]\\[fw]\\[version]]')
But fwvs.length return 0. What am I doing wrong?
Thanks
Hi,
In HTML:
<select name=site[new][fw][version]></select>
In jQuery, I've tried:
var fwvs=$('select[name=site\\[new]\\[fw]\\[version]]')
But fwvs.length return 0. What am I doing wrong?
Thanks
You should escape both opening ([) and closing (]) brackets. Check jquery selectors docs.
Try this:
$('select[name="site[new][fw][version]"]')
The attribute selectors can take arguments as strings, wrapped in quotes (single or double, same as JavaScript). Usually these aren't used, but they are useful in this case.
Working example: http://jsfiddle.net/kobi/32SNS/