load more using jquery?
I have a div having 100 results like.
<div id="main">
<div class="sub">This is a test 1</div></br>
<div clas开发者_JAVA技巧s="sub">This is a test 2</div></br>
<div class="sub">This is a test 3</div></br>
.
.
.
<div class="sub">This is a test 1oo</div></br>
</div>
At a time I am showing 10 results how can I add another 10 results on clicking add more button and so on.
Try this:
$('#main').append('[html for more divs]');
You could copy your existing content:
$('#show_more').click(function(){
$('#main').append($('#main').html());
});
Hope this helps
精彩评论