Я думаю, вы можете сделать что-то вроде этого:
$("ul.selectedItems li").each(function(){
if ($(this).is('#mypreferedid')) {
//do something here
return false; //to stop cycling
}
});
Если вы не знаете id элемента, но знаете его позицию, вы можете сделать это:
$("ul.selectedItems li").each(function(index, element){
if (index == selectedPosition) {
//do something here
return false; //to stop cycling
}
});