Ver Mensaje Individual
  #3 (permalink)  
Antiguo 05/09/2013, 13:25
santi2892009
 
Fecha de Ingreso: mayo-2012
Mensajes: 363
Antigüedad: 11 años, 11 meses
Puntos: 0
Respuesta: cargar en la parte central con jquery

te comento te pongo el codigo entero para que veas el tema;lo hago asi;
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US" lang="en-US">
<head>
<title>New document</title>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" type="text/css" href="../estilo/style.css" />
<script type="text/javascript" src="jquery-1.4.2.min.js"></script>
<!--<script type="text/javascript" src="js/jquery-ui-1.8.6.min.js></script>-->
<script type="text/javascript">
$(document).ready(function() {

$('#div-btn1').click(function(){


$.ajax({
type: "POST",
url: "tabla.php",
success: function(a) {
//$('#central').slideDown('slow', function() {
$('#central').html(a);
//});
/*$('#content').css('background-image', 'url(images/fondo.gif)');*/
/*$('#central').css('background-color', 'black');
$('#central').css('color', 'white');
$('#central').css('border', '1px white');*/

}
});
});

$('#div-btn2').click(function(){

$.ajax({
type: "POST",
url: "datosdetabla.php",
success: function(a) {

$('#central').html(a);

}
});
});

$('#div-btn3').click(function(){

$.ajax({
type: "POST",
url: "inc/news.php",
success: function(a) {

$('#central').html(a);

}
});
});

$('#div-btn4').click(function(){

$.ajax({
type: "POST",
url: "inc/contact.php",
success: function(a) {

$('#central').html(a);

}
});
});


});
</script>
</head>
<body>
<div id="content">
<div id="header">Cabecera</div>
<div id="column-left">
<ul>
<li><a href="inicio.php" style="cursor:pointer;">Inicio</a></li>
<li><a href="#" id="div-btn1" style="cursor:pointer;">Presentación</a></li>
<li><a href="#" id="div-btn2" style="cursor:pointer;">Productos</a></li>
<li><a href="#" id="div-btn3" style="cursor:pointer;">Noticias</a></li>
<li><a href="#" id="div-btn4" style="cursor:pointer;">Contacto</a></li>
</ul>
</div>
<div id="central">
<div id="central-content">
<h1>Pagina principal</h1>
<p>Contenido de la página principal</p>
</div>
</div>
</div>
</body>
</html>