It's not entirely clear what you're trying to do.
If you're starting from the
<div class="parameter-measure-unit">
and want to get the
<div class="parameter-value">
, all you need to do is:
let $unitDiv = ...;
let $valueDiv = $unitDiv.closest(".parameter").find(".parameter-value");
.closest() | jQuery API Documentation[
^]
.find() | jQuery API Documentation[
^]
Or alternatively:
let $valueDiv = $unitDiv.prevAll(".parameter-value");
.prevAll() | jQuery API Documentation[
^]
If you're starting from the
<div class="parameter">
, you can get both children with:
let $parameterDiv = ...;
let $valueDiv = $parameterDiv.find(".parameter-value");
let $unitDiv = $parameterDiv.find(".parameter-measure-unit");