• Stars
    star
    157
  • Rank 238,399 (Top 5 %)
  • Language
    HTML
  • License
    GNU General Publi...
  • Created about 11 years ago
  • Updated about 4 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Add Overflow Scroll Effect like on iOS/Android but for your website

#Fancy Scroll by Pete R. Add an Overflow Scroll Effect like on iOS/Android but for your website Created by Pete R., Founder of BucketListly

Demo

View demo

Compatibility

Modern browsers such as Chrome, Firefox, and Safari have been tested. IE and Mobile browsers have not been tested.

Basic Usage

To add an overflow scrolling effect with Fancy Scroll plugin, simply include the latest jQuery library together with jquery.fancy-scroll.js into your document's <head> and call the function as follows:

$(window).fancy_scroll({
  animation: "bounce" // Options available are bounce (like on iOS), or glow (like on Android 4.0+)
});

That's it. The function call above will add a bounce effect whenever you scroll up and reach the top/bottom of the website indicating the beginning/end of the page. With this script, you can customise these animations even further by using several options I had put in place for you to play around with. See more under Further Customisation.

Further Customisation

With Fancy Scroll, you can define animation's duration, colours (for glow effect), distance (for bounce effect) and even the CSS animation easing as you wish. Here are all the available options for you to play around with:

$(window).fancy_scroll({
  animation: "bounce", // Options available are bounce (like on iOS), or glow (like on Android 4.0+)
 	bounceDistance: 50, // ONLY for bounce effect: The distance in pixels that page will overflow. Default is 50 pixels.
 	glowColor: "#02A1FA", // ONLY for glow effect: The colour of the glow effect. Default is #02A1FA (blueish).
 	animDuration: "0.3s", // The animation duration. Can take milliseconds (200ms) or seconds value (0.2s). Default is 0.2s
 	animEasing: "cubic-bezier(0.175, 0.885, 0.420, 1.310)", // This field accept css easing options. Options available are: linear, ease-in, ease-out, ease-in-out or you can generate it with the tool available here: http://matthewlein.com/ceaser/
 });

Advanced Usage

Fancy Scroll can also be applied to divs rather than the whole document as well. All you have to do is prepare an html as follows:

<div class="container">
  <div class="innerWrapper">
    ...
  </div>
</div>

Make sure you have overflow-y scroll on the container. See example below:

.container {
  overflow:hidden;
  max-height: 400px;
}

Once all the markups are setup as shown above, you can call the function specifying the container and the innerWrapper as follows:

$(".container").fancy_scroll({
  innerWrapper: ".innerWrapper" // Let you define the selector of the inner div for the animation to be applied.
 });

Now, your container div will finally have a bounce overflow effect just like your websites. This can be apply to as many divs and/or body as you like. Pretty neat huh? I hope you will find this plugin useful.

Other Resources

More Repositories

1

onepage-scroll

Create an Apple-like one page scroller website (iPhone 5S website) with One Page Scroll plugin
JavaScript
9,544
star
2

purejs-onepage-scroll

The javascript version of the infamous jQuery One Page Scroll without relying on jQuery.
JavaScript
770
star
3

simple-text-rotator

Add a super simple rotating text to your website with little to no markup
HTML
748
star
4

loading-bar

Add a Youtube-like loading bar to all your ajax links
HTML
661
star
5

label_better

Label your form input like a boss with beautiful animation and without taking up space
JavaScript
517
star
6

flat-shadow

A small jQuery plugin that will automatically cast a shadow creating depth for your flat UI elements
HTML
483
star
7

panorama_viewer

Embed panorama photos on your website with Panorama Viewer
JavaScript
473
star
8

wheel-menu

Add a fully customisable Path-like wheel menu button to your website
HTML
403
star
9

interactive_3d

Create a 3D interactive object using images and one simple JS call
JavaScript
378
star
10

notify-better

An all in one jQuery plugin that let you change your favicon, browser's title and more to reflect new notifications
JavaScript
373
star
11

tiltedpage_scroll

Create a beautiful 3D tilted effect on scroll with jQuery Tilted Page Scroll plugin
JavaScript
323
star
12

autofix_anything

Fix position of anything on your website automatically with one js call
JavaScript
314
star
13

interactive_bg

Create an interactive moving background/object that reacts to viewer's cursor
JavaScript
232
star
14

shuffle-images

The Simplest Way to shuffle through images in a Creative Way
JavaScript
212
star
15

tip_cards

Create a card layout that let your user flip through it like you see on Google Tips
JavaScript
211
star
16

zepto-onepage-scroll

Zepto One Page Scroll is the javascript version of the infamous jQuery One Page Scroll.
JavaScript
186
star
17

adaptive-modal

Create modal windows that can be morphed from anything
JavaScript
168
star
18

immersive-slider

Create an immersive slider that changes the whole container to match the viewing slide
JavaScript
138
star
19

square_menu

Create a Square-like Menu Animation for Website using jQuery and CSS3
CSS
124
star
20

fly_sidemenu

Recreate an Airbnb iOS7 App Menu Animation using CSS3 and jQuery
CSS
113
star
21

flipout_cards

Create a Dynamic Multi Level Flip Out Cards
CSS
110
star
22

fullpage-menu

Create a Full Page, Fully CSS3 Animated Menu for your Navigation with Full Page Menu
CSS
106
star
23

jumpto

A plugin that let you create a smooth jump to sub navigational menu in one JS call
JavaScript
105
star
24

zoom-scroller

Create a Subtle Zoom Animation on Images while Scrolling
JavaScript
99
star
25

let_it_snow

Create and Control a Festive Snow on Your Website using HTML5 Canvas
JavaScript
92
star
26

endpage-box

A plugin that let you add an end page box that will display when scrolled to the bottom.
HTML
86
star
27

flipping_gallery

Create a simple but beautiful 3D flipping gallery with on JS call
JavaScript
79
star
28

subscribe-better

Create a better, highly customizable subscription modal or newsletter signup window with jQuery Subscribe Better
CSS
74
star
29

planetarium

Construct an Interactive Planet and Build the Universe on your website
JavaScript
58
star
30

flipping_text

Create a ticking text intro animation for your typography.
JavaScript
55
star
31

fullpagenav

Create a fully responsive and dynamic full page navigation with one JS call
JavaScript
35
star
32

parallax-scroller

Scroll through lists with a smooth parallax effect
JavaScript
27
star
33

flatline_icon_free

180+ high quality & minimal icons webfont for Bootstrap Framework
26
star
34

endpage_next

Navigate without moving your mouse. Pull to refresh/Hold to go next functionality on the web,
JavaScript
12
star