М
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);
}
});
return item.className == 'active';