Looking at the example here – http://jsfiddle.net/uqYeQ/3/
The first row behaves as expected, returning the index of the div within it’s parent.
I’d like the 2nd row to behave in the same way, I’d like it to return between 0 and 4 depending on which div has been clicked. I’d like to know the index of the div that has been clicked in relation to it’s parent list item.
I cannot change the html at all.
Give this a whirl (fiddle)