Javascript 将另一组div中存在的div的html从另一个div中的锚定标记targeted present更改为其他div中存在的div

Javascript 将另一组div中存在的div的html从另一个div中的锚定标记targeted present更改为其他div中存在的div,javascript,jquery,Javascript,Jquery,我试图使用另一个div中存在的锚定标记上的每个函数来更改div中存在的div的html。我的html格式是 <li class="Odd" style="width: 440px; height: 478px;"> <div class="ProductImage QuickView" data-product="79" style="height: 460px; width: 280px;"> <a href="http://www.exmp.com/mi

我试图使用另一个div中存在的锚定标记上的
每个
函数来更改
div
中存在的
div
的html。我的html格式是

<li class="Odd" style="width: 440px; height: 478px;">
    <div class="ProductImage QuickView" data-product="79" style="height: 460px; width: 280px;"> <a href="http://www.exmp.com/midnight-splendor/"><img src="http://cdn2.exmp.com/n-biq04i/bxoxsg/products/79/images/278/jpeg__18621.1394537835.280.460.jpg?c=1" alt="Midnight Splendor"></a>

        <div class="QuickViewBtn" style="background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, from(rgb(247, 247, 247)), to(rgb(220, 219, 219))); color: rgb(0, 0, 0); display: none; background-position: initial initial; background-repeat: initial initial;" data-product="79">Quick View</div>
    </div>
    <div class="ProductDetails" style="height: 0px;"> <a href="http://www.exmp.com/midnight-splendor/" class="pname"><strong>Midnight Splendor</strong></a>

        <div class="ProductPriceRating hdmenw" style="height: 15px;"> <span class="Rating Rating4"><img src="http://www.exmp.com/templates/__custom/images/IcoRating0.gif" alt="" style=""></span>

        </div>
        <div class="ProductActionAdd" style="display:;"> <a href="http://www.exmp.com/midnight-splendor/" class="hdmenw icon-Choose Options" title="Choose Options">&nbsp;</a>
 <em class="p-price"><strike class="RetailPriceValue">$40.00</strike> $20.00</em><em class="p-countdown"></em>

        </div>
    </div>
</li>

正如您所看到的,我试图将值放入
.p-countdown
中,但我希望在
这个
下完成。正在返回该值。我使用警报检查该值,但仍然无法正确定位
.p-countdown

$('.p-countdown',$this.parents(“li”)).html(newImg)@谢谢你的回答。这确实有效,你可以把它作为一个答案发布。Ill up voteit对你的案子有效,但这不是完美的答案
$('.ProductImage a').each(function () {
    var link = $(this).attr('href');
    var $this = $(this);
    $.ajax({
        url: link,
        success: function (data) {
            var newImg = $(".d-date .Value div", data).html();
            if (newImg == null) {
                //Do Nothing
            } else {
                $this.parent(".ProductDetails").next('.p-countdown').html(newImg);
            }
        }
    });
});