Fetch data in intervals but append not load
I'm trying to retrieve new records as they come in in real time.
I have this so far, but as of now its replacing the span. I want each record to stack on top of the other as they come in
<script>
$(document).ready(function(){
$("#getrecords").load("x.cfm?u=1");
// Do data load every 5 seconds
setInterval( function() { $("#
getrecords").load("x.cfm?u=1"); }, 5000 );
});
</script>
<span id="
getrecords"></span>