这是我的代码:
$('#right').load('textes.html #nicolas');
$('#right').load('textes.html #antoine');
问题是div
antoine的内容覆盖了右边的div nicolas加载的内容div
div #right : load div nicolas from file textes.html = ok
div #right : load div antoine from file textes.html = overwrite content = No!
我想将 antoine 添加到 nicolas。这是添加 nicolas 然后添加 antoine 所以#right
将是 nicolas + antoine
我试图将内容放入 var 中,但没有成功。
任何的想法 ?
最重要的是......我想在<hr>
每次加载之间添加一条规则
也许是这样的,但这不起作用。
$('#right').load('textes.shtml #nicolas').append('<hr>').load('textes.shtml #antoine'); return false;