0
I have a form and would like to take the values of the 'data-aliquot' attributes and put inside an invisible input. I don’t know how I can do it.
<form>
<input type="text" id="cidade" data-aliquota="1.00" name="cidade" value="salvador" />
<input type="text" id="estado" data-aliquota="2.00" name="estado" value="bahia" />
<input type="hidden" name="valores" id="valores" />
</form>
The way out should be something like: "1.00,2.00"
use attr do jQuery http://api.jquery.com/attr/
– kervincandido