Ver Mensaje Individual
  #1 (permalink)  
Antiguo 08/03/2011, 16:11
jrrm
 
Fecha de Ingreso: agosto-2008
Mensajes: 108
Antigüedad: 15 años, 8 meses
Puntos: 0
No me funciona este escript

Código:
$(document).ready(function(){
			$("img[width=100]").click(function() {
				xsrc = $(this).attr('src');
				ident = $(this).attr('title');
				
			});
		});
		
		
		$(document).ready(function(){
			$("img[width=50]").click(function() {
				temp = ident;
				temp = '"img[title='+temp+']"';
				$(temp).attr('src',function() {return xsrc;});
			});
		});
Cuando hago esto
$(this).attr('src',function() {return xsrc;})
si funciona, pero cuando le paso un valor, en este caso temp
$(temp).attr('src',function() {return xsrc;})
no funciona.

lo he intentado de estas dos formas
Código:
temp = '"img[title='+temp+']"';
temp = "img[title="+temp+"]";
y nada.

Les agradeceria su ayuda.