<div class="container-items_client_contact_phone">
<div class="item_client_contact_phone">
<u phoneremove>
<input type="hidden" id="clientcontactphone-0-0-id" name="ClientContactPhone[0][0][id]" value="137">
<div class="client_field field-clientcontactphone-0-0-country">
<input type="text" id="clientcontactphone-0-0-country" class="" name="ClientContactPhone[0][0][country]" value="+7" title="Код страны" country="" placeholder="+7">
</div>
<div class="client_field field-clientcontactphone-0-0-city">
<input type="text" id="clientcontactphone-0-0-city" class="" name="ClientContactPhone[0][0][city]" value="201" title="Код города/оператора" city="" placeholder="919">
</div>
<div class="client_field field-clientcontactphone-0-0-number">
<input type="text" id="clientcontactphone-0-0-number" class="" name="ClientContactPhone[0][0][number]" value="123-12-00" title="Номер" number="" placeholder="456-45-45">
</div>
<div class="client_field field-clientcontactphone-0-0-comment">
<input type="text" id="clientcontactphone-0-0-comment" class="" name="ClientContactPhone[0][0][comment]" value="" maxlength="255" title="Комментарий" phone-comment="" placeholder="Комментарий">
</div>
<a class="remove-item_client_contact_phone" href="#" title="Удалить"><span del></span></a>
</u>
</div>
</div>
function (attribute, value) {
var obj = $(attribute).length;//obj = 1
var objID = $(attribute).prop('id'); //objID = clientcontactphone-0-0-number
var parent = $(attribute).closest('div.item_client_contact_phone'); //[object Object]
var parentLength = $(attribute).closest('div.item_client_contact_phone').length; //0
var inputCity = $(attribute).closest('div.item_client_contact_phone').find('input[city]'); //[object Object]
var inputCityVal = $(attribute).closest('div.item_client_contact_phone').find('input[city]').val(); //undefined
// return true;
}
Мне нужно получить значение соседнего input-а, я так понимаю .closest() не находит почему то элемент div.item_client_contact_phone?