こんにちは、クラス「価格」のテキストボックスがたくさんあります。他のすべてのテキストボックスに最初のテキストボックスと同じ値を入力するだけです。ここに私のコードがありますが、機能していません。
$firstprice=$("."+$sectionwrapper).find(".price").first().val();
$("."+$sectionwrapper).find(".price:eq(0)").nextAll(".price").val($firstprice);
どこが間違っていますか?どんな助けでも大歓迎です。
編集
ここに私のHTMLコードがあります
<div class="section-1">
<div id="bookin-ad-wrapper">
<div class="booking-wrapper booking-wrapper-5">
<ul>
<li><label class="w50">Pris kr</label><input type="text" value="" class="price numeric required" name="txtSection[1][5][price]" style=""></li>
</ul>
</div>
<div class="booking-wrapper booking-wrapper-6">
<ul>
<li><label class="w50">Pris kr</label><input type="text" value="" class="price numeric required" name="txtSection[1][6][price]"></li>
</ul>
</div>
<div class="booking-wrapper booking-wrapper-0">
<ul>
<li><label class="w50">Pris kr</label><input type="text" value="" class="price numeric required" name="txtSection[1][0][price]"></li>
</ul>
</div>
</div>
</div>
$sectionwrapper はクラス "section-1" を示します
ありがとう