Giter VIP home page Giter VIP logo

fakeloader.js's Introduction

What is fakeLoader.js

fakeLoader.js is a lightweight jQuery plugin that helps you create an animated spinner with a fullscreen loading mask to simulate the page preloading effect.

Check out the Demo

Bower?

Me too :) fakeLoader.js is available as a Bower package. Just run

bower install fakeloader

1. Include in HTML Document

Include in the top of your <body> tag

<div id="fakeLoader"></div>



2. Include Styles

Inside <head> tag

<link rel="stylesheet" href="yourPath/fakeLoader.css">

3. Include Folowing Libraries

JQuery reference and the fakeLoader.js

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js">

<script src="yourPath/fakeLoader.min.js">

4. Basic Initialize

Include in bottom of your <body> tag


    <script type="text/javascript">
        $("#fakeLoader").fakeLoader();
    </script>

5. Options

<script type="text/javascript">

$("#fakeLoader").fakeLoader({
        timeToHide:1200, //Time in milliseconds for fakeLoader disappear
        zIndex:999, // Default zIndex
        spinner:"spinner1",//Options: 'spinner1', 'spinner2', 'spinner3', 'spinner4', 'spinner5', 'spinner6', 'spinner7' 
        bgColor:"#2ecc71", //Hex, RGB or RGBA colors
        imagePath:"yourPath/customizedImage.gif" //If you want can you insert your custom image
        
});
 &lt;/script&gt;

6. Block Mode

You can show loader until something execute finished.

<script type="text/javascript">

// init fakeLoader $("#fakeLoader").fakeLoader({ blockMode:true, //set fakeLoader use blockMode timeToHide:1200, //Time in milliseconds for fakeLoader check release status zIndex:999, // Default zIndex spinner:"spinner1",//Options: 'spinner1', 'spinner2', 'spinner3', 'spinner4', 'spinner5', 'spinner6', 'spinner7' bgColor:"#2ecc71", //Hex, RGB or RGBA colors imagePath:"yourPath/customizedImage.gif" //If you want can you insert your custom image
});

// call again after 1.5s, and release it.
// @note: the real used time is  1.5s ~ (1.5s + settings.timeToHide) 
setTimeout(function () {
    $("#fakeLoader").fakeLoader({
            release:true
    });
}, 1500);

 &lt;/script&gt;

fakeloader.js's People

Contributors

9nix00 avatar drawcard avatar joaopereirawd avatar okutani-t avatar

Watchers

 avatar  avatar

Forkers

shaoshao613

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.