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: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of [EMAIL PROTECTED]
Sent: Tuesday, February 12, 2008 1:24 PM
To: jQuery (English)
Subject: [jQuery] loading content from a remote file and appending it
into DOM element



Hi,

I would like to load content from "process_data.php?id=2" and then
append that data into the DIV with id="dataDiv", how would I do this? I
have seen the ".load" directive, but seems to erase any data previously
in the DOM element whereas I want to append on to what is already there.

Thanks for any help, - Dave

Reply via email to