We now have a youtube channel. Subscribe!

JQuery Page Pilling Plugin



Hello dear readers! Welcome back to another edition of our tutorial on jQuery. In this tutorial guide, we are going to be discussing about the jQuery PagePiling plug-in.

PagePiling.js is a jQuery plug-in for "piling" your layout sections over one another and accessing them by scrolling.

Example

The following below is a simple theming example -

<!DOCTYPE  html  lang = "en">
<html   xmlns =  "https://www.w3.org/1999/xhtml">
     <head>
          <meta  http-equiv = "Content-Type"   content = "text/html;  charset =  utf-8" />
          <link  type = "text/css"  rel = "stylesheet"
               href = "https://fonts.googleapis.com/css?family=Lato:300,400,700"  />

          <link  type = "text/css"  rel = "stylesheet"
               href = "/jquery/src/pagepilling/jquery.pagepiling.css" />

          <link  type = "text/css"  rel = "stylesheet"
               href = "/jquery/src/pagepilling/examples.css"  />

          <script  type = "text/javascript"
               src = "https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js">              
          </script>

          <script  type = "text/javascript"   
               src = "/jquery/src/pagepilling/jquery.pagepiling.min.js">
          </script>

          <script  type = "text/javascript">
               $( document ).ready( function( )  {
                    $( '#pagepiling' ).pagepiling( {
                         menu:   '#menu' ,
                         anchors:  [ 'page1' ,  'page2' ,  'page3' ,  'page4' ] ,
                         sectionsColor:  [ '#bfda00' ,   '#2ebe21' ,  '2C3E50' ,  '51bec4' ] ,

                         navigation:  {
                              'position' :  'right' ,
                              'tooltips' :  [ 'page1' ,  'page2' ,  'page3' ,  'page4' ]
                         },
                         afterRender:  function( )  {
                              //  Playing the video 
                              $( 'video' ).get( 0 ).play( );
                         }
                    } );
               } );
          </script> 

          <style>
               .section  {
                    text-align:  center;
               }
               #myVideo  {
                    position:  absolute;
                    z-index:  4;
                    right:  0;

                    bottom:  0;
                    top:  0;
                    right:  0;
                    width:  100%;
                    height:  100%;

                    background-size:  100%  100%;
                    background-color:  black;  /* Incase the video doesn't fit the whole page  */          
                    background-image:  /*  Our video */ ; 
                    background-position:  center  center;
                    background-size:  contain;
                    object-fit:  cover  /* Cover video background */
               }
               #section1  .layer {
                    position:  absolute;
                    z-index:  5;
                    width:  100%;
                    left:  0;
                    top:  43%;
                    height:  100%;
               }
               #section1   h1  {
                    color:  #fff; 
               }
               #infoMenu  li  a  {
                    color:  #fff; 
               }
          </style>
     </head>

     <body>
          <ul  id = "menu">
               <li  data-menuanchor = "page1"  class = "active">
                    <a  href = "#page1">Page 1</a></li>

               <li  data-menuanchor = "page2"  class = "active">

                    <a  href = "#page2">Page 2</a></li>

               <li  data-menuanchor = "page3"  class = "active">


                    <a  href = "#page3">Page 3</a></li>
          </ul>

          <div  id = "pagepiling">
               <div  class = "section"  id = "section1">
                    <video  autoplay  loop  muted  id = "myVideo">
                         <source  src = "imgs/flowers.mp4"  type = "video/mp4">
                         <source  src = "imgs/flowers.webm"  type = "video/webm">
                    </video>
               </div>

               <div  class = "section"  id = "section2">
                    <div  class = "intro">
                         <h1>No limits</h1>
                         <p>Any thing is possible with Web design tutorialz</p>
                    </div>
               </div>

               <div  class = "section"  id = "section4">
                    <div  class = "intro">
                         <h1></h1>
                         <p>Learn with Ease</p>
                    </div>

               </div>

          </div>
     </body>
</html>


Alright guys! This is where we are rounding up for this tutorial post. In our next tutorial guide, we are going to be discussing about the Flickerplate.js Plugin.

Do feel free to ask your questions where necessary and i will attend to them as soon as possible. If this tutorial was helpful to you, you can use the share button to share this tutorial.

Follow us on our various social media platforms to stay updated with our latest tutorials. You can also subscribe to our newsletter in order to get our tutorials delivered directly to your emails.

Thanks for reading and bye for now.

Post a Comment

Hello dear readers! Please kindly try your best to make sure your comments comply with our comment policy guidelines. You can visit our comment policy page to view these guidelines which are clearly stated. Thank you.
© 2023 ‧ WebDesignTutorialz. All rights reserved. Developed by Jago Desain