ProductPromotion
Logo

Java.Script

made by https://0x3d.site

GitHub - peachananr/onepage-scroll: Create an Apple-like one page scroller website (iPhone 5S website) with One Page Scroll plugin
Create an Apple-like one page scroller website (iPhone 5S website) with One Page Scroll plugin - peachananr/onepage-scroll
Visit Site

GitHub - peachananr/onepage-scroll: Create an Apple-like one page scroller website (iPhone 5S website) with One Page Scroll plugin

GitHub - peachananr/onepage-scroll: Create an Apple-like one page scroller website (iPhone 5S website) with One Page Scroll plugin

#One Page Scroll 1.3.1 by Pete R. Create an Apple-like one page scroll website (iPhone 5S website) with One Page Scroll plugin Created by Pete R., Founder of BucketListly

License: Attribution-ShareAlike 4.0 International

Requirement

jQuery (1.9.0 or later)

note: jQuery 1.9.0 or later is strongly recommended because using jQuery less than 1.8.3 and jquery.onepage-scroll.js together turns out to be a hash-based XSS vulnerabiliry.

see: http://jsfiddle.net/33WJx/

Demo

View demo

Compatibility

Modern browsers such as Chrome, Firefox, and Safari on both desktop and smartphones have been tested. Should work fine on IE8 and IE9 as well.

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.

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.
   beforeMove: function(index) {},  // This option accepts a callback function. The function will be called before the page moves.
   afterMove: function(index) {},   // This option accepts a callback function. The function will be called after the page moves.
   loop: false,                     // You can have the page loop back to the top/bottom when the user navigates at up/down on the first/last page.
   keyboard: true,                  // You can activate the keyboard controls
   responsiveFallback: false,        // You can fallback to normal page scroll by defining the width of the browser in which
                                    // you want the responsive fallback to be triggered. For example, set this to 600 and whenever
                                    // the browser's width is less than 600, the fallback will kick in.
   direction: "vertical"            // You can now define the direction of the One Page Scroll animation. Options available are "vertical" and "horizontal". The default value is "vertical".  
});

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.

Keyboard Shortcuts

You can trigger page move with hotkeys as well:

Up arrow / Page Up

Pressing the up arrow or the page up key allows you to move the page up by one.

Down arrow / Page Donw

Pressing the down arrow or the page down key allows you to move the page down by one.

Spacebar

Pressing the space key allows you to move the page down by one.

Home

Pressing the home key brings you back to the first page.

End

Pressing the end key brings you to the last page.

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();

$.fn.moveTo(page_index)

This method allows you to move to the specified page index programatically.

  $(".main").moveTo(3);

Callbacks

You can use callbacks to perform actions before or after the page move.

beforeMove(current_page_index)

This callback gets called before the plugin performs its move.

  $(".main").onepage_scroll({
    beforeMove: function(index) {
      ...
    }
  });

afterMove(next_page_index)

This callback gets called after the move animation was performed.

  $(".main").onepage_scroll({
    afterMove: function(index) {
      ...
    }
  });

If you want to see more of my plugins, visit The Pete Design, or follow me on Twitter and Github.

Other Resources

More Resources
to explore the angular.

mail [email protected] to add your project or resources here 🔥.

Related Articles
to learn about angular.

FAQ's
to learn more about Angular JS.

mail [email protected] to add more queries here 🔍.

More Sites
to check out once you're finished browsing here.

0x3d
https://www.0x3d.site/
0x3d is designed for aggregating information.
NodeJS
https://nodejs.0x3d.site/
NodeJS Online Directory
Cross Platform
https://cross-platform.0x3d.site/
Cross Platform Online Directory
Open Source
https://open-source.0x3d.site/
Open Source Online Directory
Analytics
https://analytics.0x3d.site/
Analytics Online Directory
JavaScript
https://javascript.0x3d.site/
JavaScript Online Directory
GoLang
https://golang.0x3d.site/
GoLang Online Directory
Python
https://python.0x3d.site/
Python Online Directory
Swift
https://swift.0x3d.site/
Swift Online Directory
Rust
https://rust.0x3d.site/
Rust Online Directory
Scala
https://scala.0x3d.site/
Scala Online Directory
Ruby
https://ruby.0x3d.site/
Ruby Online Directory
Clojure
https://clojure.0x3d.site/
Clojure Online Directory
Elixir
https://elixir.0x3d.site/
Elixir Online Directory
Elm
https://elm.0x3d.site/
Elm Online Directory
Lua
https://lua.0x3d.site/
Lua Online Directory
C Programming
https://c-programming.0x3d.site/
C Programming Online Directory
C++ Programming
https://cpp-programming.0x3d.site/
C++ Programming Online Directory
R Programming
https://r-programming.0x3d.site/
R Programming Online Directory
Perl
https://perl.0x3d.site/
Perl Online Directory
Java
https://java.0x3d.site/
Java Online Directory
Kotlin
https://kotlin.0x3d.site/
Kotlin Online Directory
PHP
https://php.0x3d.site/
PHP Online Directory
React JS
https://react.0x3d.site/
React JS Online Directory
Angular
https://angular.0x3d.site/
Angular JS Online Directory