Zerknijcie:
<!DOCTYPE html>
<html lang="pl">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script type="text/javascript" src="http:///js/jquery.cycle.all.js"></script>
<script src="http://code.jquery.com/ui/1.11.0/jquery-ui.js"></script>
<meta charset="" />
<meta name="author" content="" />
<title>Preloader</title>
<script type="text/javascript">
$(document).ready(function() {
$.ajax({
url : ('index.php'),
beforeSend : function() {
$('.loader').show();
},
success : function(obj) {
window.setTimeout(function () {
$('.loader').fadeOut();
window.setTimeout(function () {
$('body').html(obj);}, 500);
}, 2000);
},
});
});
</script>
</head>
<body>
<div class="loader" style="display: none; margin-top:150px;"><img src="490.GIF"/><br><img src="289.GIF"/></div>
</body>
</html>
Zadziała to jak preloader? Czyli bedzie sie pokazywał obrazek zanim sie wczyta cała strona?
Ten post edytował kamilo818 23.07.2014, 20:58:39