Back to laboratory

SHARE ON

FIND ME

mdSkew.js v1.1

Easily add a super-cool skew effect while scrolling your website.

Download View on Github

Introduction

Suggestion are more than welcome, not only for feature requests but also for coding style improvements. Let's make this a great library to make people's lives easier!

Examples

Required Files

Simply include mdSkew.js (or its minified version mdSkew.min.js).

Initialization

All you need to do is call mdSkew.js inside your js:

// select your element
var myElement = document.getElementByID("my-element");

// create the instance
var mdskew = new mdSkew(myElement);

// initialize
mdskew.init();

If you need multiple instance:

// select your elements
var myElements = document.querySelectorAll("h2");

// loop all elements
myElements.forEach(function(myElement){

// create the instance
var mdskew = new mdSkew(myElement);

// initialize
mdskew.init();

});

A more complex initialization with all options set could look like this:

var mdskew = new mdSkew(myElement, {
min: 0,
max: 5,
speed: 1,
setCSS: true,
transition: 'transform .6s cubic-bezier(.215,.61,.355,1)',
transformOrigin: '50% 50%'
});

Options

jQuery integration

$('.my-element').mdSkew();

Reporting issues

Who is using mdSkew.js

If you want your page to be listed here, please contact me with the URL.

Donations

Donations would be more than welcome :)

Donate

Sponsors

Become a sponsor and get your logo on our README on Github with a link to your site.

Changelog

1.1

License

The credit comments in the JavaScript and CSS files should be kept intact (even after combination or minification )

(The MIT License)

Copyright (c) 2018 Moreno Di Domenico - hello@morenodd.com

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.