Skip to main content

Page loader















<html>
<head>
<style>
.no-js #loader { display: none;  }
.js #loader { display: block; position: absolute; left: 100px; top: 0; }
.preload {
position: fixed;
left: 0px;
top: 0px;
width: 100%;
height: 100%;
z-index: 9999;
background: url(load.gif) center no-repeat #fff;
}
</style>
</head>
<body>
<div class="preload"></div>


<script src="js/jquery.min.js"></script>
<script type="text/javascript">
//paste this code under head tag or in a seperate js file.
// Wait for window load
$(window).load(function() {
// Animate loader off screen
$(".preload").fadeOut("slow");;
});
</script>
</body>
</html>

Comments

Popular posts from this blog

Get Current Location & Address in PHP

index.php ____________________________________________________________________ <!DOCTYPE html> <head> <title>GEt Current Location</title> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script> <script type="text/javascript"> jQuery(function($){ var lat = $('#lat'); var lng = $('#lng'); $('#submit').click(function(){ jQuery.ajax({ url: 'get_address.php', type: 'post', data: 'lat=' + lat.val() + '&lng='+lng.val(), success: function(results){ $("#ack").val(results) } }); }); }); </script> <script> if(!navigator.geolocation){ alert('Your Browser does not support HTML5 Geo Location. Please Use Newer Version Browsers'); } navigator.geolocation.getCurrentPosition(success, error); function success(position){ var latit...

HTML 5 pattern validation

<!DOCTYPE html> <html> <head> <title>html5 patterns val</title> </head> <body> <form action=""> Email :   <input type="email" name="email" pattern="[a-z0-9._%+-]+@[a-z0-9.-]+\.[a-z]{2,3}$" required> Min Char:  <input type="password" name="pw" pattern="(?=.*\d)(?=.*[a-z])(?=.*[A-Z]).{8,}" title="Must contain at least one number and one uppercase and lowercase letter, and at least 8 or more characters" required> Search: <input type="search" name="search" pattern="[^'\x22]+" title="Invalid input" required> Password:   <input type="password" name="pw" pattern=".{6,}" title="Six or more characters" required> Country code: <input type="text" name="country_code" pattern="[A-Za-z]{3}" title="Three let...

Onload Popup in HTML

<html> <head>     <link rel="stylesheet" href="css/bootstrap.css" type="text/css" media="screen" /> </head> <body>   <div class="modal fade" id="myModal" style="padding-top:50px;">     <div class="modal-dialog" >         <div class="modal-content">              <div class="modal-header">                 <button type="button" class="close" data-dismiss="modal">&times;</button>                 <h3><span>Description:</span></h3>              </div>              <div class="modal-body" id="myModal" align="center">                 <p>Lorem Ipsum is simply dummy text of the printing and typesetting indus...