jQuery Page Piling Plugin
Last Updated :
26 Jul, 2024
jQuery pagePiling.js plug-in is a rich feature available for programmers for piling more than one layout section, one over the other, and accessing each page by URL or mouse scrolling or side bullets navigation. This feature provides all type of smooth vertical, horizontal, and side navigations to the destination anchor links. It also manages callback functions, video backgrounds, and scrolling speeds. We will only cover few of them in the following examples.
Note: Please download the following library files from pagePiling.js plugin and save it in your working folder to include in your codes. Please download the “example.css” file from this link.
Links for jQuery pagePiling.js Plugin:
<link href=”jquery.pagepiling.css” rel=”stylesheet” type=”text/css”/>
<link href=”examples.css” rel=”stylesheet” type=”text/css”/>
<script src=”http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js”></script>
<script src=”jquery.pagepiling.min.js”></script>
Example 1: The following example demonstrates the basic working of the pagePiling plugin as written in the jQuery code. It supports interactive scrolling of different web layout pages with background images. The pages can also be navigated through side bullets on the right-hand side.
HTML
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>jQuery pagePiling plugin </title>
<meta name="Resource-type" content="Document" />
<link rel="stylesheet"
type="text/css"
href=
"http://fonts.googleapis.com/css?family=Lato:300, 400, 700" />
<link rel="stylesheet"
type="text/css"
href="jquery.pagepiling.css" />
<link rel="stylesheet"
type="text/css"
href="examples.css" />
<script src=
"http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js">
</script>
<script type="text/javascript"
src="jquery.pagepiling.min.js">
</script>
<script type="text/javascript">
let deleteLog = false;
$(document).ready(function () {
$('#pagepiling').pagepiling({
menu: '#menu',
anchors: ['page1', 'page2', 'page3'],
navigation: {
'textColor': '#f0f2f0',
'bulletsColor': '#ccc000',
'position': 'right',
'tooltips': ['Page 1', 'Page 2', 'Page 3', 'Page 4']
}
});
});
</script>
<style>
h1 {
font-size: 5em;
font-family: arial, helvetica;
color: #fff;
margin: 0;
padding: 0;
}
.section {
text-align: center;
}
#section1,
#section2,
#section3 {
background-size: cover;
}
#section1 {
background-image: url(images/background1.jpg);
}
#section2 {
background-image: url(images/background2.jpg);
padding: 6% 0 0 0;
}
#section3 {
background-image: url(images/background3.jpg);
padding: 6% 0 0 0;
}
#section3 h1 {
color: #000;
}
#section1 h1 {
position: absolute;
left: 0;
right: 0;
margin: 0 auto;
top: 30px;
color: #fff;
}
#section2 .intro {
position: absolute;
left: 0;
right: 0;
margin: 0 auto;
top: 30px;
}
#section2 h1,
#section2 p {
text-shadow: 1px 5px 20px #000;
}
#section3 h1,
#section3 p {
text-shadow: 1px 5px 20px #000;
color: #fff;
}
</style>
</head>
<body>
<ul id="menu">
<li data-menuanchor="page1" class="active">
<a href="#page1">Home</a>
</li>
<li data-menuanchor="page2">
<a href="#page2">About</a>
</li>
<li data-menuanchor="page3">
<a href="#page3">jQuery</a>
</li>
</ul>
<div id="pagepiling">
<div class="section" id="section1">
<h1>GeeksForGeeks</h1>
</div>
<div class="section" id="section2">
<div class="intro">
<h1>GFG Backgrounds </h1>
<p>All pages with layouts!</p>
</div>
</div>
<div class="section" id="section3">
<div class="intro">
<h1>Learn Jquery </h1>
<p>Its fun learning plugins.</p>
</div>
</div>
</div>
</body>
</html>
Output:
Example 2: In the following example, the top and bottom looping features are enabled. For this, the loopTop and loopBottom properties are set to “true” as shown in the jQuery code.
HTML
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type"
content="text/html; charset=utf-8" />
<title>jQuery pagePiling plugin for Looping</title>
<meta name="Resource-type"
content="Document" />
<link rel="stylesheet"
type="text/css"
href="jquery.pagepiling.css" />
<link rel="stylesheet"
type="text/css"
href="examples.css" />
<script src=
"http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js">
</script>
<script type="text/javascript"
src="jquery.pagepiling.min.js">
</script>
<script type="text/javascript">
let deleteLog = false;
$(document).ready(function () {
$('#pagepilingDivID').pagepiling({
menu: '#menu',
anchors: ['page1', 'page2', 'page3'],
sectionsColor: [
'green', 'lime', 'forestgreen', 'darkgreen'],
loopTop: true,
loopBottom: true
});
});
</script>
</head>
<body>
<ul id="menu">
<li data-menuanchor="page1" class="active">
<a href="#page1">Home</a>
</li>
<li data-menuanchor="page2">
<a href="#page2">About</a>
</li>
<li data-menuanchor="page3">
<a href="#page3">Contact</a>
</li>
</ul>
<div id="pagepilingDivID">
<div class="section" id="section1">
<h1>GeeksForGeeks</h1>
<p>
Looping through top and bottom is working.
</p>
</div>
<div class="section" id="section2">
<div class="intro">
<h1>Page Piling in a Looping style</h1>
<p>To see the looping page piling feature,
just use the PgUp and PgDn scroll keys .
</p>
</div>
</div>
<div class="section" id="section4">
<div class="intro">
<h1>
Back to the first page after scrolling down.
</h1>
<p>And it shows a looping feature, scrolling
down till the end gets back the first section.
</p>
</div>
</div>
</div>
</body>
</html>
Output:
Example 3: In the following example, horizontal scrolling is enabled for pages by setting option direction: ‘horizontal’ as shown in the jQuery code.
HTML
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type"
content="text/html; charset=utf-8" />
<title>
jQuery pagePiling plugin for
Horizontal scroll
</title>
<link rel="stylesheet"
type="text/css"
href="jquery.pagepiling.css" />
<link rel="stylesheet"
type="text/css"
href="examples.css" />
<script src=
"http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js">
</script>
<script type="text/javascript"
src="jquery.pagepiling.min.js">
</script>
<script type="text/javascript">
$(document).ready(function () {
$('#pagepilingDivID').pagepiling({
direction: 'horizontal',
menu: '#menu',
anchors: ['page1', 'page2', 'page3', 'page4'],
sectionsColor: [
'green', 'forestgreen', 'lime', 'white'],
navigation: {
'position': 'right',
'tooltips': [
'Page 1', 'Page 2', 'Page 3', 'Page 4']
},
});
});
</script>
<style>
#section1 img {
margin: 20px 0;
opacity: 0.7;
}
#colors2,
#colors3 {
position: absolute;
height: 150px;
width: 370px;
z-index: 1;
background-repeat: no-repeat;
left: 0;
margin: 0 auto;
right: 0;
}
#colors2 {
background-image: url(images/colors2.png);
top: 0;
}
#colors3 {
background-image: url(images/colors3.png);
bottom: 0;
}
</style>
</head>
<body>
<ul id="menu">
<li data-menuanchor="page1"
class="active">
<a href="#page1">Home</a>
</li>
<li data-menuanchor="page2">
<a href="#page2">About</a>
</li>
<li data-menuanchor="page3">
<a href="#page3">Tutorials</a>
</li>
</ul>
<div id="pagepilingDivID">
<div class="section" id="section1">
<img src="images/background1.jpg"
alt="pagePiling" />
<br />
<h1>GFG Horizontal Scroll</h1>
<p>
pagePiling also provides
horizontal scrolling
</p>
</div>
<div class="section">
<div class="intro">
<h1>
Highly flexible and configurable
</h1>
<p>
Do the horizontal way of
scrolling and check!
</p>
</div>
</div>
<div class="section" id="section3">
<div class="intro">
<h1>
Very interactive for users
</h1>
<p>
Great idea to include in websites
</p>
</div>
</div>
</div>
</body>
</html>
Output:
Similar Reads
jQuery Page Piling Plugin
jQuery pagePiling.js plug-in is a rich feature available for programmers for piling more than one layout section, one over the other, and accessing each page by URL or mouse scrolling or side bullets navigation. This feature provides all type of smooth vertical, horizontal, and side navigations to t
5 min read
jQuery | Flickerplate Plugin
jQuery provides Flickerplate plugin that helps our programmers to create sliders for websites that can cycle through a list of background images along with dot navigation feature and animated arrows. The plugin consists of many more libraries that are responsible for touch detections and events such
5 min read
jQuery Multiscroll Plugin
jQuery provides multiscroll.js plugin which helps programmers to create split web pages along with divided multiple vertical scrolling panels. Note: Please download the jQuery multiscroll plugin to your working folder and include the required files in the head section of your code as shown below. Do
4 min read
jQuery RowGrid Plugin
jQuery provides a very simple, user-friendly and responsive rowGrid plugin that helps programmers to display images in a straight row. It is very lightweighted and supports infinite scrolling feature. Real examples of rowGrid are Google+ images or Google image search that appears in a straight row g
4 min read
jQuery Alertify Plugin
jQuery framework provides alertify.js plugin that provides pre-designed customizable notification system along with interactive browser dialogs. This extensible and themeable plugin is very useful for developers providing an optimized version of alert messages with stacking up to feature. This small
5 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. <link href=âprogressbar.cssâ r
2 min read
jQuery DrawSVG Plugin
SVG or Scalar Vector Graphics is Extended Markup Language-based graphics supporting 2 dimensional animations of images enhancing interactiveness. The specifications of SVG are open standards by World Wide Web Consortium defined in XML text files. These files can be changed or created with any drawin
4 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 a
9 min read
jQuery Logos Distort Plugin
The jQuery provides LogosDistort plugin which helps in creating or animating a parallax environment for 3D scenes in the user browser. It uses full-page matrix3D perspective logos distortions for transforming base on mouse movement. You have to download the required files in the working folder so th
4 min read
jQuery Filer Plugin
jQuery provides a quick jQuery Filer uploader plugin for easy implementation of uploading the files. It provides features like instant uploading of files, file append, file removal, multiple selections, drag and drop support along with other file validations. Download the required files to include i
3 min read