Here is my code:
$('#right').load('textes.html #nicolas');
$('#right').load('textes.html #antoine');
The problem is that the content of the div
antoine overwrites the content loaded by the div nicolas in the right div
div #right : load div nicolas from file textes.html = ok
div #right : load div antoine from file textes.html = overwrite content = No!
I'd like to append antoine to nicolas. This is to add nicolas and then add antoine so #right
will be nicolas + antoine
I have tried to get the content into a var but it didn't work.
Any idea ?
On top of that... I would like to add a rule <hr>
BETWEEN each load
Maybe something like this, but this doesn't work.
$('#right').load('textes.shtml #nicolas').append('<hr>').load('textes.shtml #antoine'); return false;
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…