A jQuery plugin that adds some cool effects when a user scrolls down the page.
What is basically does is calculate the distance from the top to bottom of the selector when the user has scrolled down to determine how the selector should change it's appearance with CSS attributes.
I wrote the plugin for a private project, but I thought why not share it with the world.
If you want to see a working example visit http://marksten.github.io/jquery.scrollfx
NOTE: This plugin is currently in development.
npm install jquery.scrollfx --saveFind jquery.scrollfx.js in the root directory. Make sure to include it after jQuery.
$(selector).scrollFx(function() {
scaleElements: '', // required
opacityElements: '', // required
precision: '' // optional
});Here is a list of all available options.
The elements that should be scaled inside of the wrapper. Joined with a ','.
The elements that should change their opacity attribute. Joined with a ','.
This option effects the overall performance of your website. The higher the precision, the 'smoother' the effects. If you don't want to overheat your users' GPU or CPU your should reduce this number.
This plugin has been tested on Google Chrome, Safari (retina display) and on an iPhone6.