Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • JavaScript Pagination

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 200
    Comment on it

    JavaScript Pagination

    Here i am going to describe how we would add JavaScript pagination to the table. We'll focus on displaying a particular page of data.

    $(document).ready(function() {
    $('table.paginated').each(function() {
    var currentPage = 0;
    var numPerPage = 10;
    var $table = $(this);
    $table.find('tbody tr').show()
    .lt(currentPage * numPerPage)
    .hide()
    .end()
    .gt((currentPage + 1) * numPerPage - 1)
    .hide()
    .end();
    });
    });
    

    This code displays the first pageten rows of data.

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: