$( document ).ready(function(){
var items = [];
$('.box').find('.target').each(function() {
if(!$(this).parents('.mobile').length){
items.push(this);
}
});
var current = $('.
target.active'),
index = items.indexOf(current);
if(index != -1){
console.log(index);
}
});