jeudi 28 mars 2019

how to select every 1st 2nd 3rd .... nth

simply i wanted to do this for a loop;

<div class="A">query_result_1</div>
<div class="B">
    <span>query_result_2</span>
    <span>query_result_3</span>
</div>
<div class="c">query_result_4</div>
<div class="A">query_result_5</div>
<div class="B">
    <span>query_result_6</span>
    <span>query_result_7</span>
</div>
<div class="C">query_result_8</div>

  1. How to select 1st, 5th, 9th ...etc results to attend A class?
  2. How to select 2nd, 6th ... etc results to attend B class before it ?
  3. How to select 4th, 8th ... etc results to attend C class?

I hope i am clear...

Aucun commentaire:

Enregistrer un commentaire