Ver Mensaje Individual
  #9 (permalink)  
Antiguo 09/03/2010, 10:30
Dany_s
 
Fecha de Ingreso: diciembre-2009
Ubicación: Misiones
Mensajes: 867
Antigüedad: 14 años, 4 meses
Puntos: 65
Respuesta: Heredar estilos con Jquery Ajax

hay muchos errores pero lo que hice fue
sacar el evento onclic del link DANY_S y usar el evento clic de jquery.
Cuando se completa la carga volvi a iniciar el slideView

esto
Código HTML:
		function cargar_dinamico_Dany_s(elemento,archivo){
		$("#cargaGaleria").live('click', function(){
        $("#cargando").css("display", "inline");
        $(elemento).load(archivo, function(){
        $("#cargando").css("display", "none");
        });
        $(elemento).fadeIn(3000);
		});
por esto
Código HTML:
		$().ready( function (){
			$("#cargaGaleria").click( function (){
				$("#cargando").css("display", "inline");

				$("#contenedor_fotos").load('galeria1.html', function(){ $("#cargando").css("display", "none"); $("div#the_beauty_of_abandoned_fotos").slideView() });

				$("#contenedor_fotos").fadeIn(3000);
			});
		});

y me queda asi


Código HTML:
<!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="es" lang="es">
<head>

<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<!-- METATAGS -->
<meta name="Title" content="Pol Viladmos Photography" />
<meta name="Subject" content="Photography" />
<meta name="Description" content="Photography album of Pol Viladoms photographer" />
<meta name="Keywords" content="pol, viladoms, pol viladoms, photography, barcelona" />
<meta name="Language" content="Spanish" />
<meta name="Revisit" content="15 days" />
<meta name="Distribution" content="Global" />
<meta name="Robots" content="All" />

<title>Pol Viladoms Photography</title>

		<!--CSS de la página-->
		<link href="./css/style.css" rel="stylesheet" type="text/css" />


		<!--Scripts del proyecto-->
		<script src="http://code.jquery.com/jquery-latest.js"></script>
		<script src="http://www.hectorgarrofe.com/pol/js/jquery.easing.1.3.js" type="text/javascript"></script>
		<script src="http://www.hectorgarrofe.com/pol/js/jquery.slideviewer.1.2.js" type="text/javascript"></script> 

		
		
		<!--INICIO función para mostar/ocultar div SELECCION DE DIVS-->
		<script type="text/javascript">
			function muestra_oculta(id)
			{
				if (document.getElementById) //se obtiene el id
				{
				var el = document.getElementById(id); //se define la variable "el" igual a nuestro div
				el.style.display = (el.style.display == 'none') ? 'block' : 'none'; //damos un atributo display:none que oculta el div
				}
			}
		window.onload = function() //hace que se cargue la función lo que predetermina que div estará oculto hasta llamar a la función nuevamente
		{
			muestra_oculta('msup_the_beauty_of_abandoned'); //etiqueta DIV que deseamos mostrar
		}
		</script>
		<!--FIN función para mostar/ocultar div-->
		
		
		<!--INICIO función para mostar/ocultar div2 EFECTOS-->
		<script type="text/javascript">
			function aparece(id)
			{
				$(id).fadeIn(1500);
				
			}
			function desaparece(id)
			{
				$(id).fadeOut(1500);				
			}
		</script>
		<!--FIN función para mostar/ocultar div2-->
		
		<!--Función para mostar contenido dinámico 2 POR HINFRA-->
		<script type="text/javascript">
		function cargar_dinamico2(elemento,archivo){
		$(elemento).fadeOut(0);
		$("#cargando").css("display", "inline");
		$(elemento).load(archivo, function(){
		$("#cargando").css("display", "none");
		});
		$(elemento).fadeIn(3000);
		}
		</script>
		<!--FIN Función para mostar contenido dinámico 2 POR HINFRA-->
		
		<!--Función para mostar contenido dinámico 2 POR MAYID-->
		<script type="text/javascript">
		function cargar_dinamico_mayid(elemento,archivo){
		$("#cargando").css("display", "inline");
		$.getScript('js/jquery.slideviewer.1.2.js', function() {
		$(elemento).load(archivo, function(){ $("#cargando").css("display", "none"); });
		});
		$(elemento).fadeIn(3000);
		}
		</script>
		<!--FIN Función para mostar contenido dinámico 2 POR MAYID-->
		
		<!--Función para mostar contenido dinámico 2 POR DANY_S-->
		<script type="text/javascript">
		
		$().ready( function (){
			$("#cargaGaleria").click( function (){
				$("#cargando").css("display", "inline");

				$("#contenedor_fotos").load('galeria1.html', function(){ $("#cargando").css("display", "none"); $("div#the_beauty_of_abandoned_fotos").slideView() });

				$("#contenedor_fotos").fadeIn(3000);
			});
		});
		</script>
		<!--FIN Función para mostar contenido dinámico 2 POR DANY_S-->
		
		<script type="text/javascript">
		$(window).bind("load", 
		function() {
			$("div#the_beauty_of_abandoned_fotos").slideView() 
			});
		</script>
		
</head>


<body>

	<div id="wrapper">
	
	<div id="cargando" style="display:none; color: green;">Cargando...</div>
			
		<div id="header">
		
			<div id="logo"><img src="img/logo.png" alt="Pol Viladoms"></div>
		
		
			<div id="msup_the_beauty_of_abandoned">
			THE BEAUTY OF ABANDONED <small><a href="#" onclick="desaparece('#the_beauty_of_abandoned_contenedor');">ACUATIC PARK</a> - <a href="#" onclick="aparece('#the_beauty_of_abandoned_contenedor');">ACUATIC PARK II</a> - ACUATIC III - PLEAMAR</small>
			</div>
		</div>


		
		<div id="contenedor_fotos">
		
		<div id="the_beauty_of_abandoned_contenedor">
		

		
		<div id="the_beauty_of_abandoned_fotos" class="svw">
			<ul>
				<li><img width="950" height="300" alt="abc defrg thysu ooip jkifbtg fff" src="fotos/1.jpg" /></li>
				<li><img width="950" height="300" alt="abc defrg thysu ooip jkifbtg fff" src="fotos/2.jpg" /></li>
				<li><img width="950" height="300" alt="abc defrg thysu ooip jkifbtg fff" src="fotos/3.jpg" /></li>
				<li><img width="950" height="300" alt="abc defrg thysu ooip jkifbtg fff" src="fotos/4.jpg" /></li>
			</ul>
		</div>
		
		</div>
		
		</div>
		

		
		
		<div id="footer">
			<div id="menu_inferior_inicial">
			
				<li>
					<ul><a href="#" onclick="aparece('#msup_the_beauty_of_abandoned');">THE BEAUTY OF ABANDONED</a></ul>
					<ul><a href="#" onclick="cargar_dinamico_mayid('#contenedor_fotos','galeria1.html');">MAYID</a></ul>
					<ul><a href="#" id="cargaGaleria">DANY_S</a></ul>
					<ul><a href="http://www.google.com">WIDELUX WORLD</a></ul>
					<ul><a href="http://www.google.com">BARCELONA SKYLINES</a></ul>
					<ul><a href="http://www.google.com">ARCHITECTURE</a></ul>
					<ul><a href="http://www.google.com">UNDERWATER PORTRAITS</a></ul>
					<ul><a href="http://www.google.com">A TYPOGRAPHY</a></ul>
				</li>
			</div>
		</div>
		
	
	</div>




</body>
</html> 

Última edición por Dany_s; 09/03/2010 a las 10:37