se supone que con este código puedo hacer cambiar la imagen de fondo de mi sitio web automáticamente,
el problema es que mi código original ya esta "bastante desarrollado" y no me ubico
lo que necesitó sabes es, ¿que secciones de este código van en que secciones de mi código principal?
CODIGO A INTEGRAR :
Código:
$(function() {
var body = $(‘body’);
var backgrounds = new Array(
‘<img src="images/imagenes_portadas/album_entreprises.jpg" width="304" height="400" />’,
‘<img src="images/imagenes_portadas/albumMari2.jpg" width="350" height="212" />)’
);
var current = 0;
function nextBackground() {
body.css(
‘background’,
backgrounds[current = ++current % backgrounds.length]
);
setTimeout(nextBackground, 10000);
}
setTimeout(nextBackground, 10000);
body.css(‘background’, backgrounds[0]);
});
mi código
Código:
<!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>photographe á nantes / Accueil</title>
<link rel="Shortcut icon" href="images/imagenes_portadas/logito.ico"/>
<link href="css/estilo.css" rel="stylesheet" type="text/css" />
<script src="SpryAssets/SpryMenuBar.js" type="text/javascript"></script>
<script type="text/javascript">
function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
</script>
<style type="text/css">
#principal {
width: 900px;
margin-right: auto;
margin-left: auto;
border-top-width: 0px;
border-right-width: 0px;
border-bottom-width: 0px;
border-left-width: 0px;
margin-top: 0px;
}
#principal #tituloindex {
font-family: Aaargh;
padding-left: 30px;
font-size: 28px;
padding-top: 10px;
}
#principal #contenido {
margin-top: 0px;
padding-left: 70px;
padding-right: 20px;
font-family: sans-serif;
color: #000;
}
#principal #pie {
font-family: sans-serif;
font-size: 11px;
height: 60px;
}
#principal #pie table {
border-top-width: 1px;
border-bottom-width: 1px;
border-top-style: solid;
border-bottom-style: solid;
border-right-color: #DDD;
border-bottom-color: #DDDDDD;
border-left-color: #DDD;
border-top-color: #DDD;
}
a:link {
color: #333;
text-decoration: none;
}
a:visited {
color: #333;
text-decoration: none;
}
a:hover {
color: #999;
text-decoration: none;
}
a:active {
text-decoration: none;
color: #CCC;
}
#principal #contenido table tr td #t2 {
width: 405px;
background-image: url(images/bot_principales/cuadrosIndex.jpg);
background-repeat: no-repeat;
height: 425px;
padding-right: 5px;
}
#apDiv2 {
position: absolute;
width: 400px;
height: 410px;
z-index: 1;
background-color: #FFF;
top: 405px;
visibility: hidden;
}
#principal #contenido table tr td #apDiv2 #images {
margin-top: 70px;
background-color: FFFF;
margin-left: 0px;
}
#principal #contenido p img {
margin-left: -70px;
}
#principal #tituloindex {
font-family: Aaargh;
padding-left: 30px;
font-size: 29px;
}
#pie {
background-image: url(images/bot_principales/pie_hoja.jpg);
height: 180px;
}
#pie table {
}
#pie table tr td {
font-size: 16px;
text-align: left;
color: #969696;
}
#pie table tr td .Tous_droits {
}
body{
no-repeat center center fixed;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
background-image: url(images/imagenes_portadas/RFE_4862.jpg);
background-attachment: scroll;
background-repeat: no-repeat;
background-position: 0px 202px;
padding: 1px;
height: 98%;
width: 98%;
position: absolute;
overflow: scroll;
}
</style>
<link href="css/css2.css" rel="stylesheet" type="text/css" />
<link href="css/barraDeMenu.css" rel="stylesheet" type="text/css" />
<link href="SpryAssets/SpryMenuBarHorizontal.css" rel="stylesheet" type="text/css" />
</head>
<body onload="MM_preloadImages('images/imagenes_portadas/reportage','images/imagenes_portadas/studio','images/imagenes_portadas/macro','images/imagenes_portadas/art','images/imagenes_portadas/entreprises')">
<div id="principal">
<div id="encabezado">
<table width="900" border="0" id="TabEncabezado">
<tr>
<td valign="bottom"><ul id="BarraDeMenu" class="MenuBarHorizontal">
<li><a href="index.html">Accueil</a></li>
<li><a href="contact.html">Contact</a></li>
<li><a href="#" class="MenuBarItemSubmenu">Services</a>
<ul>
<li><a href="reportages.html">Reportages</a></li>
<li><a href="portraits.html">Portraits</a></li>
<li><a href="art.html">Art</a></li>
</ul>
</li>
<li><a href="galeries.html" class="MenuBarItemSubmenu">Portfolio</a>
<ul>
<li><a href="galeries.html">Books</a></li>
<li><a href="videos.html">Videos</a></li>
</ul>
</li>
</ul></td>
</tr>
</table>
</div>
<div id="imagen"></div>
<div id="tituloindex"></div>
<div id="contenido">
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
</div>
</div>
<script type="text/javascript">
var MenuBar1 = new Spry.Widget.MenuBar("BarraDeMenu", {imgDown:"SpryAssets/SpryMenuBarDownHover.gif", imgRight:"SpryAssets/SpryMenuBarRightHover.gif"});
</script>
<div id="pie">
<table width="100%" height="166" align="center">
<tr>
<td width="32%" height="29"> </td>
<td width="20%"> </td>
<td width="22%"> </td>
<td width="26%"> </td>
</tr>
<tr>
<td height="112"><div align="center"><a href="contact.html" target="_self"><img src="images/bot_principales/ct.jpg" width="60" height="48" alt="contact" /></a><a href="https://www.facebook.com/Florespinosa-172729192868002/" target="_blank"><img src="images/bot_principales/fb2.jpg" width="60" height="58" alt="FB" /></a><a href="https://www.youtube.com/playlist?list=PLtbBOsjrUD-7AAWR_jchWEj-xusIVgCCY" target="_blank"><img src="images/bot_principales/yt2.jpg" width="60" height="57" alt="yt" /></a></div></td>
<td> </td>
<td><div align="center">
<p> </p>
<p align="left"> </p>
<p> </p>
<p> </p>
</div></td>
<td><p align="left">Florespinosa ©Tous droits réservés 2013</p>
<p align="left">Dernière actualisation de site: 18/12/15</strong></p></td>
</tr>
</table>
</div>
</body>
</html>
seguro es muy simple para mucho pero yo estoy muy perdido
de ante mano gracias