[jQuery] Re: loading content from a remote file and appending it into DOM element

2008-02-12 Thread Alexandre Plennevaux
simple and dirty: append an empty element to the div#dataDiv, and have the loaded data inserted into it: $('').appendTo('#dataDiv').load('process_data.php?id=2'); or in fact you could simply use the $.get $.get('process_data.php?id=2',function(data){ $(data).appendTo('#dataDiv'); }); On Feb

[jQuery] Re: loading content from a remote file and appending it into DOM element

2008-02-12 Thread Smith, Allex
Warning... This may be a poor method, but it works: // store the old content var $old = $("#dataDiv").html(); // run your load function $("#dataDiv").load("process_data.php?id=2",function(){ // prepend old content $(this).prepend($old); }); -Original Message- From: jq