js get class how use index code example
Example: get index of element with class javascript
<div class="myClass"></div>
<div class="myClass" id="fourth"></div>
<div class="myClass"></div>
<div class="myClass"></div>
<div class="myClass"></div>
<div class="myClass"></div>
<div class="myClass" id="fourth"></div>
<div class="myClass"></div>
<div class="myClass"></div>
<div class="myClass"></div>