|    
			
				22/11/2014, 17:45
			
			
			  | 
  |   |  |  |  Fecha de Ingreso: noviembre-2014 
						Mensajes: 15
					 Antigüedad: 10 años, 11 meses Puntos: 1 |  | 
  |  Respuesta: usar la misma funcion mas de 1 vez  
   Cita:  
					Iniciado por satanson123   Usa el mismo ejemplo que te comente mas arriba: 
Código HTML:
 Ver original<!DOCTYPE html><!--Created using JS Binhttp://jsbin.com Copyright (c) 2014 by anonymous (http://jsbin.com/mukaxowufu/1/edit) Released under the MIT license: http://jsbin.mit-license.org--><meta name="robots" content="noindex">#bar{    display: block;} .foo{    max-width: 400px;}      <img src = "http://www.absolut-canada.com/wp-content/uploads/2009/09/pesca-en-quebec.jpg" class = "foo" />    <img src = "http://static3.absolutcaribe.com/wp-content/uploads/2009/09/playa-placencia.jpg" class = "foo" /><script id="jsbin-javascript">var boton = document.querySelector("#bar"),    imagenes = document.querySelectorAll(".foo"),    total = imagenes.length; boton.addEventListener("click", function(){    for (var i = 0; i < total; i++){        if (getComputedStyle(imagenes[i]).maxWidth == "400px"){            imagenes[i].style.maxWidth = "120px";        }        else{            imagenes[i].style.maxWidth = "400px";        }    }}, false);
Solo tenias que borrar una imagen. 
Este ejemplo sí funciona. Tengo que estudiarlo a ver si lo entiendo.  
Funciona perfecto.   
Muchísimas gracias.  
Un saludo.      |