我有这个 jQuery 脚本:
$('.company').each(function(i, item) {
var tempTitle = item.title;
$('Working').appendTo("div[title='" + tempTitle + "']");
});
这是HTML:
<li><div class="company" title="32"></div><div class="shortdescription">Short Description Here</div></li>
<li><div class="company" title="33"></div><div class="shortdescription">Short Description Here</div></li>
<li><div class="company" title="34"></div><div class="shortdescription">Short Description Here</div></li>
<li><div class="company" title="35"></div><div class="shortdescription">Short Description Here</div></li>
<li><div class="company" title="36"></div><div class="shortdescription">Short Description Here</div></li>
并且没有在 div 中添加任何细节。
我犯的错误在哪里?o_o