29.08.2012, 20:25
Hey guys this is not an add but on my site for my community: (not out yet) i have a background slide show on the main page but for some reason it only shows the first image and glitches up http://vrp-gta.us IDK why
Код:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Vanity RolePlay</title>
<link href="style.css" rel="stylesheet" type="text/css" />
<style type="text/css">
body,td,th {
color: #2b2b2b;
}
</style>
<script src="http://code.jquery.com/jquery-latest.min.js" type="text/javascript"></script>
<script type="text/javascript">
var timer;
var ftimer;
var $active;
var $next;
var refreshT;
function slideSwitch() {
clearInterval(ftimer);
clearInterval(timer);
$active = $('#slides img.active');
if ( $active.length == 0 ) $active = $('#slides img:last');
$next = $active.next().length ? $active.next(): $('#slides img:first');
$active.addClass('lactive');
$next.css({opacity: 0.0})
.addClass('active')
.animate({opacity: 1.0}, 1000, function() {
$active.removeClass('active lactive');
callFunc();
});
}
function callFunc() {
var time = $next.attr('time');
timer = setInterval('slideSwitch()', time);
}
$(document).ready(function(e) {
ftimer = setInterval('slideSwitch()', 2000);
});
</script>
</head>
<body>
<div id="header" align="center">
<div id="hcontain" align="center">
<div id="slides">
<img src="images/slides/1.jpg" width="1680" height="505" class="active" time="5000"/>
<img src="images/slides/2.jpg" width="1680" height="505" time="3000"/>
</div>
<div id="header_bg2">
<?php include('menu.php'); ?>
</div>
</div>
</div>


