I have a select dropdown that has a name attribute[12], how can I use jquery to get that element by its name only?
<select name="attribute[12]"></select>
Currently I am trying to access it by using:
$('select[name="attribute[12]"]')
I have a select dropdown that has a name attribute[12], how can I use jquery to get that element by its name only?
<select name="attribute[12]"></select>
Currently I am trying to access it by using:
$('select[name="attribute[12]"]')
Try this,
$('select[name="attribute\\[12\\]"]')
Your select tag's name is containing two meta-characters [ and ]. You have to escape it in order to make your selector working. Please read here for full reference.