我有幾個.desc div的一頁。我想在這些div中添加一些html到最後的paragrahs。如何添加HTML到jQuery的類的最後一段?
我已經試過這個..
但是這只是把它添加到該分區在整個頁面的最後一段。不是每個在.desc div中的最後一個paragrapgh。如果這是有道理的......
<div class="desc">
<p>Description1</p>
</div>
<div class="desc">
<p>Description2 <span class="orange readMore" style="display: inline; ">Read More</span> <span class="orange readLess" style="display: none; ">Read Less</span></p>
</div>
不起作用,它增加了兩次,最後的P – Beginner