The Wayback Machine - https://web.archive.org/web/20240924192047/https://www.geeksforgeeks.org/how-to-integrate-jquery-pagination-plugin/
Open In App

How to integrate jQuery Pagination Plugin ?

Last Updated : 12 Apr, 2021
Summarize
Comments
Improve
Suggest changes
Like Article
Like
Save
Share
Report
News Follow

 simplePagination.js is a jQuery plugin that provides simple yet fully customizable pagination in our websites.  It is a robust and highly customizable jQuery-based pagination system for your long content to improve webpage readability. Its major features are listed below.

  • You can paginate any group of HTML elements on the webpage.
  • It is easy to use and can be used to dynamically generates pagination links.
  • It is highly customizable.

Now lets us know how to integrate this Pagination Plugin in our website .

First include these CDN links in your html file.

<script src=”https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js”></script>
<script src=”https://cdnjs.cloudflare.com/ajax/libs/simplePagination.js/1.6/jquery.simplePagination.min.js”></script>
<link rel=”stylesheet” href=”https://cdnjs.cloudflare.com/ajax/libs/simplePagination.js/1.6/simplePagination.min.css”>

Example:

HTML




<!DOCTYPE html>
<>
   
<head>
    <style type="text/css">
        body {
            font-size: 14px;
            line-height: 18px;
            background: green;
        }
           
        .item {
            border: 1px solid #EEE;
            background: #FFF;
            margin-bottom: 10px;
            padding: 10px;
        }
           
        #pagination {
            margin-left: 500px;
        }
    </style>
</head>
   
<body>
    <div class="wrapper">
        <div class="item">
            <h4>Data Structure and Algorithm</h4>
            <p>
                Learn Data Structures & Algorithms 
                at your own pace to prepare for top 
                product-based companies like Amazon, 
                Uber, Adobe, etc. It contains 200+ 
                algorithmic coding problems, Lifetime 
                access to the Course, Premium Lecture 
                videos by Mr. Sandeep Jain
                (CEO & Founder, GeeksforGeeks)
            </p>
        </div>
  
        <div class="item">
            <h4>Fork Java</h4>
            <p>Specially designed free Java course 
                for beginners which strengthens 
                your base in the language from 
                scratch. This course is specially 
                designed for the Java apprentices 
                who want to hone their skills 
                in Java for Coding Interviews 
                and Competitive
                Programming. No matter if you 
                are a school student or college 
                student, if you have the zeal of 
                programming, this is the right 
                time to start. 
            </p>
        </div>
  
        <div class="item">
            <h4>
                11 Weeks Workshop on Data 
                Structures and Algorithms 
            </h4>
               
            <p>
                As these are live sessions, every 
                week you will be interacting with 
                the top industry expert where you
                will learn how they implement DSA 
                in real-life scenarios. Not just 
                this, but you will also be able to 
                understand all the concepts of DSA
                in-depth. In addition, weekly Q/A 
                sessions will be conducted to 
                resolve your queries and discuss 
                questions asked most frequently in 
                interview of product-based companies.
            </p>
        </div>
  
        <div class="item">
            <h4>Data Structure and Algorithm</h4>
            <p>
                Learn Data Structures & Algorithms 
                at your own pace to prepare for top 
                product-based companies like Amazon, 
                Uber, Adobe, etc. It contains 200+ 
                algorithmic coding problems, Lifetime 
                access to the Course, Premium Lecture 
                videos by Mr. Sandeep Jain (CEO & 
                Founder, GeeksforGeeks)
            </p>
        </div>
  
        <div class="item">
            <h4>Fork Java</h4>     
            <p>
                Specially designed free Java course for 
                beginners which strengthens your base in 
                the language from scratch. This course is 
                specially designed for the Java apprentices 
                who want to hone their skills in Java 
                for Coding Interviews and Competitive
                Programming. No matter if you are a 
                school student or college student, 
                if you have the zeal of programming, 
                this is the right time to start. 
            </p>
        </div>
  
        <div class="item">
            <h4>
                11 Weeks Workshop on Data 
                Structures and Algorithms 
            </h4> 
            <p>
                As these are live sessions, every 
                week you will be interacting with 
                the top industry expert where you 
                will learn how they implement DSA 
                in real-life scenarios. Not just 
                this, but you will also be able to 
                understand all the concepts of DSA
                in-depth. In addition, weekly Q/A 
                sessions will be conducted to resolve 
                your queries and discuss questions 
                asked most frequently in interview 
                of product-based companies.
            </p>
        </div>
  
        <div class="item">
            <h4>Data Structure and Algorithm</h4>     
            <p>
                Learn Data Structures & Algorithms 
                at your own pace to prepare for top 
                product-based companies like Amazon, 
                Uber, Adobe, etc. It contains 200+ 
                algorithmic coding problems, Lifetime 
                access to the Course, Premium Lecture 
                videos by Mr. Sandeep Jain
                (CEO & Founder, GeeksforGeeks)
            </p>
        </div>
  
        <div class="item">
            <h4>Fork Java</h4>     
            <p>
                Specially designed free Java course 
                for beginners which strengthens your 
                base in the language from scratch.
                This course is specially designed for
                the Java apprentices who want to hone 
                their skills in Java for Coding 
                Interviews and Competitive Programming. 
                No matter if you are a school student 
                or college student, if you have the 
                zeal of programming, this is the 
                right time to start. 
            </p>
        </div>
  
        <div class="item">
            <h4>
                11 Weeks Workshop on Data 
                Structures and Algorithms 
            </h4> 
            <p>
                As these are live sessions,
                every week you will be interacting 
                with the top industry expert where 
                you will learn how they implement DSA 
                in real-life scenarios. Not just this, 
                but you will also be able to understand 
                all the concepts of DSA
                in-depth. In addition, weekly Q/A 
                sessions will be conducted to resolve 
                your queries and discuss questions asked 
                most frequently in interview of 
                product-based companies.
            </p>
        </div>
    </div>
   
    <div id="pagination"></div>
  
    <script>
        $(".wrapper .item").slice(4).hide();
        $('#pagination').pagination({
  
            // Total number of items present
            // in wrapper class
            items: 9,
  
            // Items allowed on a single page
            itemsOnPage: 4, 
            onPageClick: function (noofele) {
                $(".wrapper .item").hide()
                    .slice(4*(noofele-1),
                    4+ 4* (noofele - 1)).show();
            }
        });
    </script>
</body>
   
</html>


Output:

PAGINATION AT BOTTOM



Similar Reads

How to make table searchable and sortable with pagination using jQuery?
The jQuery fancyTable plugin helps the developers to design HTML tables that are searchable and sortable with pagination feature. This plugin is totally based on JavaScript and HTML. Official website for plugin: Please take care of file paths while implementing the codes. https://github.com/myspace-nu/jquery.fancyTable Example 1: The following code
3 min read
EasyUI jQuery pagination widget
In this article, we will learn how to design a pagination widget using jQuery EasyUI. The pagination widget allows the user to navigate data by pages. It helps in building features for interactive web and mobile applications saving a lot of time for developers. Downloads for EasyUI for jQuery: https://www.jeasyui.com/download/index.phpSyntax: var a
2 min read
jQuery | Mask Plugin
jQuery mask is a jQuery plugin that helps in putting on a mask on the basic HTML input fields and other elements. If the developer wants the input field to take inputs in a certain format only, then they can use the jQuery mask plugin for it. This type of functionality can also be created using a back end language like PHP. However, it will be much
3 min read
How to create a jQuery plugin with methods?
Jquery is a Javascript library that is built to design or simplifies HTML, CSS, AJAX, DOM as well as event handling for web development. It is Open Source Software and free to all. More than 10 million websites use jquery. Jquery simply converts a line of javascript into methods that can be called in a single line of code. These plugins are impleme
2 min read
jQuery | table2excel Plugin
In the process of web design and development, taking regular backups is an important practice followed. jQuery provides table2excel plugin which helps to export HTML tables to excel (.xls) files. Please download the required library files from the jQuery table2excel plugin and include it in your working folder as shown in the following examples. Do
3 min read
How to upload files using jQuery Dropzone Plugin ?
jQuery has many types of file upload plugins that are used to upload various types of files and can be processed further at the backend. Usually, PHP is used widely as backend language with ajax call. We also have dynamic jQuery plugins where we can drag and drop the files. Some of the file uploader plugins are: Fine-Uploader JQuery File upload Upl
2 min read
jQuery BlockUI Plugin
The BlockUI plugin is used to simulate synchronous AJAX behavior. When activated, it stops the user from interacting with the page until it is deactivated. The DOM (Document Object Model) is added with elements to give a nice user-interface look and feel along with behavior. Download Link: &lt;script src="https://malsup.github.io/jquery.blockUI.js"
2 min read
jQuery Jcrop Plugin
In this article, we will learn how to crop an image using PHP and jQuery Jcrop plugin. Note: Please download the jQuery Jcrop plugin and include the required files in the head section of your HTML code. &lt;link href=”jquery.Jcrop.min.css” rel=”stylesheet” type=”text/css”/&gt; &lt;script src=”jquery.min.js”&gt;&lt;/script&gt; &lt;script src=”jquery
2 min read
jQuery jTippy Tooltip Plugin
In this article, we will learn how to implement the tooltip feature using the jQuery jTippy Tooltip plugin. Note: Please download the jQuery jTippy plugin in the working folder and include the required files in the head section of your HTML code. &lt;link href=”https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css” rel=”styleshee
3 min read
jQuery Image ProgressBars Plugin
In this article, we will learn how to implement image ProgressBar feature using the jQuery Image ProgressBar plugin. Note: Please download the jQuery Image ProgressBar plugin in the working folder and include the required files in the head section of your HTML code. &lt;link href=”progressbar.css” rel=”stylesheet” type=”text/css”/&gt; &lt;script sr
2 min read
How to use jQuery touch events plugin for mobiles ?
In this article, we will learn how to handle various touch events for mobile user interface designing using the jQuery Touch Events plugin which is completely based on JavaScript. These are additional events that can be used with the jQuery which are also compatible with desktop applications as well as mobile web apps. Please download the required
3 min read
How to design editable listview using jQuery Mobile plugin?
In this article, we will learn how to design an editable listview feature using the jQuery mobile plugin. The plugin provides an intuitive user interface to add or delete list items to the existing list. To design and implement the plugin, please download the required pre-compiled files or libraries from the link and save it in your working folder.
3 min read
How to design form controls for mobiles using jQuery Mobile Square-UI Theme plugin ?
In this article, we will learn how to design the form controls for mobile-oriented applications using the jQuery Mobile Square-UI Theme plugin. Prerequisite: Download the pre-compiled required library files from the given link and save it in your working folder for the following implementation. Example 1: C/C++ Code &lt;!DOCTYPE html&gt; &lt;html
4 min read
How to design form controls for mobiles using jQuery Mobile BootstrapTheme plugin ?
The purpose of this article is to introduce some form or user input controls for mobile web designers using the jQuery Mobile Bootstrap Theme plugin. These CSS based UI controls are very attractive and interactive and help developers build beautiful apps. To design and implement the plugin, please download the required pre-compiled files or librari
5 min read
How to use a jQuery Mobile autoComplete plugin?
In this article, we will learn about the AutoComplete jQuery Mobile plugin which helps mobile or web developers to add autocomplete search box in their projects. Please download the required pre-compiled files from the below link and save it in your working folder for implementation. Please take care of proper file paths while including in your sou
3 min read
jQuery Slidebar.js Plugin
JQuery is a small, fast, rich JavaScript Library that is an optimized version of JavaScript. It provides us with a simple API that helps in HTML document traversal and manipulation, event handling, animation, and Ajax. jQuery provide us with a variety of plugins that can be implemented on the website, one of which is Slidebar.js. Slidebar.js: It is
2 min read
How to Validate Phone Number using jQuery Input Mask Plugin ?
An input mask is a string expression that demonstrates the format of a valid user input value or we can say that it constrains user input. This is very useful if there are certain inputs in forms that require validation. In this article, we will learn how to apply an input mask for validating a phone number in an input element using jQuery. There a
3 min read
jQuery multiple select plugin for Bootstrap
jQuery provides a variety of plugins for bootstrap for distinctive purposes which can be easily integrated into a web application, making the websites and applications look more attractive and reliable. Plugins can be included in two ways i.e. individually by using Bootstrap's individual *.js files, or all at once, utilizing bootstrap.js. Bootstrap
2 min read
How to create a plugin that can add/remove a class on hover using jQuery ?
There are two ways to create a plugin that can add and remove a class on hovering on an HTML element. Prerequisite: jQuery plugins Approach 1: Using the this property &amp; hover() and toggleClass() methods in jQuery. A simple plugin $.fn.hoverClass = function(e) {..} is created with an anonymous function attached to it. The parameter "e" takes in
3 min read
How to create a custom jQuery Plugin ?
In this article, we will see the creation of a custom jQuery plugin that will change the background color of an element when the mouse hovers over it. The plugin takes a color as an argument and sets the background color of each element to that color when the element has hovered over. When the mouse leaves the element, the original background color
3 min read
How to Use the Magnific Popup jQuery Plugin?
Magnific Popup is a fast, light, mobile-friendly and responsive lightbox and modal dialog jQuery plugin. It can be used to open inline HTML, ajax loaded content, image, form, iframe (YouTube video, Vimeo, Google Maps), and photo gallery. It has added animation effects using CSS3 transitions. ApproachIN this approach, we have created a small popup u
2 min read
Form validation using jQuery Poppa Plugin
In this article, we will learn how to implement form validation using jQuery Poppa plugin. It is a very easy to use, reliable, cross-browser friendly, and lightweight plugin that makes client-side validation very simple. Note: Please download the jQuery Poppa plugin in the working folder and include the required files in the head section of your HT
4 min read
How to design desktop functionality using jQuery-lwd plugin ?
This article will help you to design a basic desktop engine using the jQuery-UI lwd plugin. This plugin is very light weighted and totally based on JavaScript and CSS. The desktop engine provides some following features for web developers - MovableResizableFocus on active windowRestore windows on clickMinimizable, MaximizableDownload all the requir
2 min read
How to design lazy loading of images/videos for mobiles using jQuery Plugin?
In this article, we will learn to design the loading of images or videos for mobile-oriented applications using the jQuery Lazy Load XT plugin. Prerequisite: Download the pre-compiled required library files from the link and save it in your working folder for the following implementation. Example 1: The following example demonstrates the ajax loadi
2 min read
How to design tabview for mobiles using the tabview jQuery plugin ?
In this article, we will learn how to design tabs for mobiles using the jQuery tabview plugin which is a jQuery-based plugin. The following steps have to be followed to use the plugin: Step 1: Download all the required pre-compiled files from the official Github and save it in your working folder. Step 2: Create a new HTML file and import the files
2 min read
How to design filter widget for mobiles using jQuery plugin ?
In this article, we will learn how to design a filterable widget for the user interface of mobile applications using the jQuery filter bar plugin. The plugin works with many HTML controls like select, buttons, tables, control groups. Download the required pre-compiled files from this link and save it in your working folder for the implementation of
2 min read
How to handle events using jQuery DataTables plugin?
DataTables are a modern jQuery plugin for adding interactive and advanced controls to HTML tables for our webpage. It is a simple-to-use jQuery plug-in with a huge range of many options for the developer's custom changes. The common features of DataTables are sorting, searching, pagination, and multiple-column ordering.  In this article, we will le
3 min read
jQuery Blockrain.js Plugin
jQuery plugins enhance an application with features that would generally take a long time to program correctly. However, some plugins are useful in providing entertainment to users. Although many professional sites may not need these, it is a fun feature to include in personal blogs and websites.  Blockrain.js plugin provides a Tetris game created
3 min read
jQuery Tagsort Plugin
jQuery provides Tagsort plugin that is used for displaying tags or filter elements based on different tags in a DOM. The plugin takes data-attributes of HTML page structure and dynamically creates user-friendly tags used for filtering elements. The filtration of elements are done in many ways that are handled in options setting feature provided by
9 min read
How to handle multiple rows selection using jQuery DataTables plugin ?
Datatables is a modern jQuery plugin for adding interactive and advanced controls to HTML tables for our webpages. It is a simple and easy to use with a many options available for developer's custom changes. The other common features are pagination, searching, sorting and multiple column ordering. In this article, we will learn to handle multiple r
3 min read