Question: How to select a classes with same name without using incremental id
Is there other ways to select classes with same name but in different table rows? I use html class="className + id" Than in jquery to select $('.className'+id)... some code I would like to avoid using the id each time. Some suggestions? Thank you
HMTL Data retrieved from the database <tr class="row" id="<?= $id;?>"> <!-- id 1 --> <td class="atyp<?= $id;?>"> <?= $v['atyp'];?> </td> <tr class="row" id="<?= $id;?>"> <!-- id 2 --> <td class="atyp<?= $id;?>"> <?= $v['atyp'];?> </td> JQUERY <script> $('.atyp'+id).val() // some code.... </script>
So the table has multiple rows with same class name and I would like to php error avoid to use id to select a specific class
9codings