Wednesday, May 11, 2016

how to create or make a loading screen in html javascript

Here is the simple way to create or make a loading screen in html and javascript
Write two functions like below:
// This is to show the loading page / progress bar


function showProgress() {
    var scrollPos = (window.pageYOffset > $('html').scrollTop())?(window.pageYOffset):($('html').scrollTop()),
    imgYPos = scrollPos + (($(window).height() / 2 ) -30 ) ,
    overlayObj = $('
').height($(document).height())
                     .css('background-position', 'center '+imgYPos+'px');            
    $('body').append(overlayObj);
}
// This is to hide the loading page / progress bar
function hideProgress() {
    $('.pageLoadingOverlay').remove();
}

And the CSS for this code snippet is
.pageLoadingOverlay {
    height: 100%;
    width: 100%;
    display: block;
    z-index: 100;
    position: absolute;
    left: 0;
    top: 0;
    background: rgba(0, 0, 0, 0.5) url("../images/325.gif") no-repeat center center; 

}

Now you can call showProgress() when processing the screen and hide progress while closing the screen

Freecharge Coupon Code New User - Freecharge Coupon

Use below Freecharge Promo Code to recharge through Freecharge and get Rupees 50.

RMCJ7C5

Use this Freecharge Promo Code to recharge with minimum amount of Rs. 50 and get 50 to your Freecharge account.

Freecharge Promo Code: RMCJ7C5

To Get Rs. 50 as Freecharge Cash Back follow the process

Download Freecharge App or Login/Register with your Freecharge account

Click on Mobile Recharge

Recharge with Rs. 50

Use Promo Code RMCJ7C5

Proceed to pay with freecharge

Get Rs. 50 to your freecharge account.

You are Done...