后,我有HTML像这样:如何添加HTML字符串的第一次出现所选元素
<div class=foo>
(<a href=forum.example.com>forum</a>)
<p>
Some html here....
</div>
我要插入另一个链接后的第一个,像这样:
<div class=foo>
(<a href=forum.example.com>forum</a>) <a href=blog.example.com>blog</a>
<p>
Some html here....
</div>
......而是因为它被封闭在()
我不能使用:
$('div.foo a:first').append(' <a href=blog.example.com>blog</a>');
...这将在之前把它。
那么如何扩展我的jQuery选择来选择文字)
还是需要使用其他解决方案?
正确的关于'after()' – user191688 2010-03-23 18:38:28