Dinamic list of elements

Dinamic list of elements

Dear all, hello :)

I have problem with color of list elements.

It is <li> tags, every with diferent id ... id='elem_li'+i ... i is 0 for first, 1 for seconde....

Every list have <div> with text with index i and id 'text'+i and some buttons delete, save and edit with same...

I have color and hover function - that i do with moduo i%2==0;

Thats all works, but problem is when i delete odd or even element, i have to same color one neer other..

How that i can fix. Maybe with for or each loop but i dont now to set a query.

Thank you, Milos..