到底什么时候加$
$("#bt2").on('click', function() {
//在test2元素前后插入集合中每个匹配的元素
//不支持多参数
$('<p style="color:red">测试insertAfter方法增加</p>', '<p style="color:red">多参数</p>').insertAfter($(".test2"))
('.test2').after('<p>你好我在后面加入</p>','<p>哈哈哈</p>')
})
为什么我用after方法就不用加$,也可以实现,而insertBefore中插入必须要用$()