Index of element in Dom7

I want get index of list that have id.
let listItem = $$(".list-class .item").index(’#slider_’+id);
but it always return 0; how can i fix this issue?

$$(".list-class #slider_"+id).index();