I am working on a project where I need to find the position of a "div" element, relative to the other divs (index position). for example if I have a div of class "item" and below it a div of class "list", the "item" would have an index value of 0, and the "list" would have an index value of 1.
I need help in finding the divs index.
I also need to use vanilla javascript without any library and no jQuery
I would share the code but unfortunatly, I write the program on an air gapped system. so I cannot post the code here.