2
這裏是我的HTML:在最後一個標籤之前追加?
<section>
<article></article>
<article></article>
<!-- INSERT HERE -->
<footer></footer>
</section>
我怎麼會插入最後article
後,但在此之前的footer
內容?
我試着這樣做:
$('<article>Yipee</article>').appendTo('section article:last');
但是,插入新article
最後一個內,而不是作爲同級。
我正在運行jQuery 1.6.2。