Giter Club home page Giter Club logo

m-pagetransition's Introduction

M-PageTransition

M-PageTransition

M-PageTransition is a jQuery plugin that allows you to easily have your web pages fade to and from a designated color.

Install and Usage

Clone the repo and import m-pagetransition.js and m-pagetransition-styles.css into your project.

Now add the m-pagetransition class to your body element (this will add visibility: hidden to your body to prevent flickering on page loads).

Now call mPageTransition() on your body element. You are done!

$(document).ready(function() {
    $('body').mPageTransition();
});

Custom settings

To configure the color and fade times you can pass a settings object in the mPageTransition function.

$(document).ready(function() {
    $('body').mPageTransition({
        "color": "#007db8",
        "fadeInTime": 350,
        "fadeOutTime": 700
    });
});

Examples

Clone the repo and in the examples directory open the index.html file for a local demo.

Soon there will be a live example!

Options

These can be passed via an object to the mPageTansition() method to configure the settings of the plugin.

Class Description
color String - The color value (hex or css supported color value) that the page will fade to
fadeOutTime Number (milliseconds) - The time it takes for the page to fade off
fadeInTime Number (milliseconds) - The time it takes for the page to fade on

m-pagetransition's People

Contributors

madmaxmckinney avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Forkers

basha-nasar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.