このオブジェクトからアイテムを取得したいと思います:
var things = {
"thing1" : "I'm one",
"thing2" : "I'm two",
"thing3" : "I'm three",
}
そして、それらをこのマークアップに追加します。
<div class="allthings">
<div class="thing1">other content first. </div>
<div class="thing2">other content first. </div>
<div class="thing3">other content first. </div>
</div>
その結果:
<div class="thing1">other content first. <p class="added">I'm one</p></div>
... etc.
.each()ループは得意ではありません。jQueryに相当するものは何ですか:
「オブジェクト内の各アイテムについて、アイテムのキーに一致するクラスを持つdivを見つけ、クラスが「追加」された段落としてアイテムの値を追加します。」