Create an Apple-like one page scroll website – jQuery Plugin

This is a neat and straightforward one page scroll plugin created by Pete R.( Founder of BucketListly), which allows you to create an Apple-like one page scroll website (iPhone 5S website). It is really easy to use and it is compatible with all the major browsers excluding IE (as the author states). I did a quick test in IE10 and noticed that it has problems with positioning the elements: e.g. phone pngs that are used for the backgrounds. But I guess this is something that can be easily fixed so you can contribute you ideas on github. It is also not fully responsive but again this is fixable (I am not sure that it was the intention of the author.) Nonetheless, this plugin is simple, neat and your websites will look great.

You can customise the animation timing, the selector or even the animation easing using CSS3, which makes it a neat and smooth moving scroll plugin. So if you have any ideas how this plugin can be made even better you can fork Pete on github.

One Page Scroll plugin

DEMO | DOWNLOAD

Compatibility

Modern browsers such as Chrome, Firefox, and Safari on both desktop and smartphones have been tested. Not tested on IE.

Basic Usage

One Page Scroll let you transform your website into a one page scroll website that allows users to scroll one page at a time. It is perfect for creating a website in which you want to present something to the viewers. For example, Apple’s iPhone 5S website uses the same technique.

Related post:  Top 15 tools To Achieve Accuracy in Your Web Development/Design Projects

To add this to your website, simply include the latest jQuery library together with jquery.onepage-scroll.js,onepage-scroll.css into your document’s <head> and call the function as follows:

<body>
  ...
  <div class="main">
    <section>...</section>
    <section>...</section>
    ...
  </div>
  ...
</body>

Container “Main” must be one level below the body tag in order to make it work full page. Now call the function to activate as follows:

$(".main").onepage_scroll({
   sectionContainer: "section", // sectionContainer accepts any kind of selector in case you don't want to use section
   easing: "ease", // Easing options accepts the CSS3 easing animation such "ease", "linear", "ease-in", "ease-out", "ease-in-out", or even cubic bezier value such as "cubic-bezier(0.175, 0.885, 0.420, 1.310)"
   animationTime: 1000, // AnimationTime let you define how long each section takes to animate
   pagination: true, // You can either show or hide the pagination. Toggle true for show, false for hide.
   updateURL: false // Toggle this true if you want the URL to be updated automatically when the user scroll to each page.
});

And that’s it. Now, your website should work the same way Apple’s iPhone 5S website does. You should be able to swipe up/down as well (thanks to Eike Send for his swipe events!) when viewing your website on mobile phones.

Related post:  Animsition - Easy CSS Animated Page Transitions with jQuery

Public Methods

You can also trigger page move programmatically as well:

$.fn.moveUp()

This method allows you to move the page up by one. This action is equivalent to scrolling up/swiping down.

  $(".main").moveUp();

$.fn.moveDown()

This method allows you to move the page down by one. This action is equivalent to scrolling down/swiping up.

  $(".main").moveDown();

 

Other Resources

Divi WordPress Theme

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *

By continuing to use the site, you agree to the use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.

Close