4
How can I get the id of the alternative and know if it is 0, 1 or 2.
<div class="quest-alternatives">
<p class="brand-alternative">
<span class="brand-id hidden" style="display: none;">123</span>
<span class="radio-button" id="brand-0"></span>
<label for="brand-0" class="brand-name">Opção 0</label></p>
<p class="brand-alternative">
<span class="brand-id hidden" style="display: none;">456</span>
<span class="radio-button" id="brand-1"></span>
<label for="brand-1" class="brand-name">Opção 1</label></p>
<p class="brand-alternative">
<span class="brand-id hidden" style="display: none;">789</span>
<span class="radio-button" id="brand-2"></span>
<label for="brand-2" class="brand-name">Opção 2</label></p></div>
used the $('span.brand-id.hidden').html()
however it only returned me the id of the first alternative
also tried to use the $.each
I just don’t quite understand how it works.
Filipe, what is the ID you want to take? da
<span>
after<<span class="brand-id hidden" style="display: none;">
?– Sergio