サンプル HTML コード
//Not the correct working code just wrote for this clarification
<div id="1">
<input type="text">
.
.
<p>
</div>
<div id="2">
<button id="btn1">
<button id="btn2">
.
.
.
</div>
ボタンをクリックすると、ナビゲートする必要があります
ID 1 で
私が得たものは
$(this).parent().prev().parent()
ID 1 に到達できます。
ID1 で に到達し、ID2 のボタン クリックからそれらの要素にアクセスするための代替方法を探しています。
繰り返しているかどうかはわかりませんが、それを行う別の方法を知りたいだけです!!
ありがとう