Ver Mensaje Individual
  #3 (permalink)  
Antiguo 19/05/2015, 12:30
kiraesley
 
Fecha de Ingreso: marzo-2015
Mensajes: 9
Antigüedad: 9 años, 1 mes
Puntos: 0
Respuesta: Funcion .load jquery

Código HTML:
<!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" lang="en" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Prueba carga de libro</title>

    <script src="http://code.jquery.com/jquery-1.7.2.min.js"></script>
<script>
function cargar(div, desde)
{

     $(div).load(desde);
}
</script>
<style>
.caja1{
	width: 400px;
	height: 400px;
	overflow: auto;
}
</style>
    </head>
    <body>
        <div id="divtest" class="caja1">Contenido que cambia</div>
<a href="#" onclick="cargar('#divtest', 'libro.html#index-4-4')">Contenido a cargar</a>
</body>

</html>