DIV内にある特定のグループのボタンを選択し、そのIDをページの非表示フィールドに割り当てることを希望しますが、私の人生の中では、div内のJquery選択ボタン
:SOURCE HTML
<div id = test>
<div class="ButtonGroupWrapper">
<img src="test.jpg" width="100" height="100" alt="thumbnail" />
<input id="buttonID5" type="submit" value="Link" class="button" />
</div>
<div class="ButtonGroupWrapper">
<img src="test.jpg" width="100" height="100" alt="thumbnail" />
<input id="buttonID6" type="submit" value="Link" class="button" />
</div>
</div>
jQueryのセレクタが
$(".ButtonGroupWrapper").find(":button").click(function() {
alert("hi there");
return false;
});
$("#ButtonGroupWrapper input[type=button]").click(function() {
alert("hi there");
return false;
});
$("#ButtonGroupWrapper :button").click(function() {
alert("hi there");
return false;
});
ありがとうございました。 アラート( "hi there"); false false; }}}}}}}}}}}}}}}}}}} ); – RenRock