current_obj.parent().parent().parent()
closest
https://jquery-docs.ru/closest/var current_obj = $(this),
parent = current_obj.closest('.custom_div'),
name = $('input[name="search_unit"]', parent);
console.log(name);
var current_obj = $(this);
var group_id = current_obj.parent().parent().parent().data('group_id');
$('#new_unit input[name="group_id"]').val('0');
$('#new_unit input[name="unit_id"]').val(0);
$('#new_unit input[name="search_unit"]').val('');
$('#new_unit input[name="group_id"]').val(group_id);
var current_obj = $(this);
var name = $('#new_unit input[name="search_unit"]').val();
var unit_id = $('#new_unit input[name="unit_id"]').val();
var group_id = $('#new_unit input[name="group_id"]').val();
$('.test2').css("top")
каков ответ? И скорее всего auto
var i, j, sel = /a:hover/;
for(i = 0; i < document.styleSheets.length; ++i){
try{
var rules = document.styleSheets[i].cssRules;
for(j = 0; j < rules.length; ++j){
if(sel.test(rules[j].selectorText)){
console.log( rules[j].selectorText, rules[j].style.cssText);
}
}
}catch(e){
console.log('Error ', i);
}
}
var st = document.createElement('style'),
tn = document.createTextNode(`
.elem:hover,
.elem.hover {
background: blue;
}
`);
document.getElementsByTagName('head')[0].appendChild(st);
st.appendChild(tn);
Довольно доходчиво по grunt. Второй и третий урок.
Вообще, эти вопросы решаются на момент разработки.
В том состоянии, которое вы описали - да, работы предстоит очень много, но это решаемо.