阅读背景:

jQuery找到最接近的图像src到一个div。

来源:互联网 

if I have the following html:

如果我有以下html:

<div class="showPin">
    <div class="pinIt" style="display: none;">
        <a href="/go.html?url=#" onclick="window.open(&quot;https://pinterest.com/pin/create/button/?url=https://mysite.com/some-post&amp;description=Some Description&amp;media=https://mysite.com/path/to/myimage.jpg&quot;,&quot;Pinterest&quot;,&quot;scrollbars=no,menubar=no,width=600,height=380,resizable=yes,toolbar=no,location=no,status=no&quot;);return false;"><img src="images/pinbutton.jpg" class="pinbuttonImg"></a>
    </div>
    <a href="/go.html?url=myimage.jpg">
        <img class="lazy data-lazy-ready" src="myimage.jpg" data-lazy-type="image" data-lazy-src="https://dev.papermusepress.com/stageblog/wp-content/uploads/2012/11/Fall_baby_shower_mantle2.jpg" alt="Fall Baby Shower Mantle" width="700" height="393" style="display: inline;">
    </a>
</div>
<



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: