开发者

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜