css - pagination in javascript with dynamic page numbers -


i having 4 blocks , in 1 page 3 blocks should displayed , in next 1 block should displayed , page numbers should generated dynamically according the pages.i have given html , javascript coding.how pagination ?

  <div id=1></div> <ul class="pagination pagination-lg">   <li><a href="#">&laquo;</a></li>   <li><a href="#">1</a></li>   <li><a href="#">2</a></li>   <li><a href="#">3</a></li>   <li><a href="#">4</a></li>   <li><a href="#">5</a></li>   <li><a href="#">&raquo;</a></li> </ul> <div id="2"></div>  (var = 0; < 5; i++) {      var a1 = $("<label></label>")          .prop("class", i)          .text("nand" + i)          .css({          'margin-left': '5px'      });       var mailidicon = $("<img />")                                     .prop("id", i)                                     .prop("src", "http://www.picturesnew.com/media/images/images.jpg")                                     .css({                                         width: '100px',                                         height: '100px'                                     });     //some images come       var b1 = $("<label></label>")          .prop("class", i)          .text("nanh" + i)          .css({          'margin-left': '5px'      });       var mailidicon1 = $("<img />")                                     .prop("id", i)                                     .prop("src", "http://www.picturesnew.com/media/images/images.jpg")                                     .css({                                         width: '100px',                                         height: '100px'                                     });      var c1 = $("<label></label>")          .prop("class", i)          .text("nanf" + i)          .css({          'margin-left': '5px'      });      var mailidicon2 = $("<img />")                                     .prop("id", i)                                     .prop("src", "http://www.picturesnew.com/media/images/images-background.jpg")                                     .css({                                         width: '100px',                                         height: '100px'                                     });       $("#1").append(a1).append(mailidicon).append("<br>").append(b1).append(mailidicon1).append("<br>").append(c1).append(mailidicon2).append("<br><hr>");  } 


Comments

Popular posts from this blog

google api - Incomplete response from Gmail API threads.list -

Installing Android SQLite Asset Helper -

Qt Creator - Searching files with Locator including folder -