Ver Mensaje Individual
  #9 (permalink)  
Antiguo 16/12/2008, 14:31
_rulo
 
Fecha de Ingreso: enero-2008
Mensajes: 39
Antigüedad: 16 años, 3 meses
Puntos: 1
Respuesta: cambiar id jquery

Que lio
Intento explicarlo.

hasta ahora tengo:

Código:
div id="slide" style="display:none;">
<img src="imagenes/casas_peste/1.jpg" onload="slideshow();"/>
<img src="imagenes/casas_peste/2.jpg" />
<img src="imagenes/casas_peste/3.jpg" />
<img src="imagenes/casas_peste/4.jpg" />
<img src="imagenes/casas_peste/5.jpg" />
</div>

<div id="txt_01" class="textos" style="display:none;">
<b>ARCHITECTURE + LANDSCAPE ONE HOUSE + ONE HOUSE = ONE HOUSE</b><br/>
<br>

The project is framed in a strong <b>NATURAL CONTEXT</b> with a topography characterized by a decreasing unevenness towards the interior of the parcel, with a great presence of the vegetation. <br/>
<br>

This strong presence of the nature, important characteristic of the zone, is to begin with necessary condition for the origin of the proposal.
</div>

<div id="images" class="boton">images </div> 
<div id="text" class="boton">text </div>


<script type="text/javascript" charset="utf-8">

 $("#images").click(function() { 
          $("#primero .activo").removeClass('activo').addClass('boton');
          $(this).addClass('activo')
         
          $('#txt_01').fadeOut('slow', verimagen);                
       });
       
       function verimagen() {   
          $('#slide').fadeIn('slow');	};

$("#text").click(function() { 
          $("#primero .activo").removeClass('activo').addClass('boton');
          $(this).addClass('activo')
         
          $('#slide').fadeOut('slow', vertexto);                
       });
       
       function vertexto() {   
          $('#txt_01').fadeIn('slow');	
       };

</script>
Los divs, slide y txt_01 están uno encima del otro, exactamente en la misma posición.
Por defecto aparece visble slide, y oculto txt_01.

Los manejo desde los botones: images y text.

Lo que me gustaría es hacerlo desde un mismo botón.

O sea, que al principio cuando slide este visible, la única opción que tenga sea el botón text. Para ocultar el slide y mostrar el texto.

Y que cuando el texto este visible y el slide este oculto, verá solo el botón images, que ocultaría el texto y dejaría visible el slide


En realidad puedo hacer lo que me propone kurroman, pero pensé que podría haber otra manera (usando jquery) sin tener que hacer una clase más y todo eso.