1
This statement returns me the state acronym: SC
$("#billing\\:city").val(dados.uf);
I have a select so I can’t change:
<select id="billing:region_id" name="billing[region_id]">
<option value="">Por favor, selecione o estado</option>
<option value="485">Acre</option>
<option value="486">Alagoas</option>
<option value="487">Amapá</option>
...
<option value="507">Santa Catarina</option>
</select>
How could I create a relationship between the acronym and the state code to select the state of the acronym?
Like
This answer is correct, but a curiosity that I think is cool that users are aware and even I have suggested as editing, is always use the prefix 'data-' for attributes invented by the user in the html tag. Although it works without this prefix, there is this standard for private user data, and the browser does not even try to interpret when we have this prefix set. Source: http://www.w3schools.com/tags/att_global_data.asp
– LF Ziron