keep showing post result
Posted: Tue Jun 07, 2011 10:58 am
This code works and shows the time
file time.php
[syntax]<?php
echo time().'<br />';
?>[/syntax]
Result is the following if clicking show more link
ie
1307461931
show more
How can I have keep the previous time and add one to the list, basically would be showing the following?
1307461931
1307461940
1307461972
show more
Every time I click show more, it would add a time to the list
Code: Select all
<script type="text/javascript">
jQuery(document).ready(function(){
jQuery("#show_more").click(function(){
var rel = jQuery(this).attr("rel");
var data = {
action: 'more',
rel: rel
};
jQuery("#read_more").html("loading...");
jQuery.post("time.php", data,
function(response){
jQuery('#more').html(response);
});
return false;
});
});
</script>
<div id="more"></div>
<a id="show_more" href="" rel="2">show more</a>[syntax]<?php
echo time().'<br />';
?>[/syntax]
Result is the following if clicking show more link
ie
1307461931
show more
How can I have keep the previous time and add one to the list, basically would be showing the following?
1307461931
1307461940
1307461972
show more
Every time I click show more, it would add a time to the list