Ver Mensaje Individual
  #7 (permalink)  
Antiguo 09/07/2010, 09:57
Avatar de mayid
mayid
Colaborador
 
Fecha de Ingreso: marzo-2009
Ubicación: BsAs
Mensajes: 4.014
Antigüedad: 15 años
Puntos: 101
Respuesta: $(this).attr("src") me devuelve enlaces locales

Gracias por probarlo.

La verdad no se por qué me daba ese error al usar variables. Ahora ya las descarté y mi evento quedó así:
Cita:
$("img").each(function(i){

//only process the foreign ones
IMGsrc = $(this).attr("src");
if (IMGsrc.search("http") != -1)
{

// check the width of the image
if ($(this).width() > 780) {

$(this).addClass("resized"); // apply resized class

$(this).click(function(){
location.href = this.getAttribute("src");
});
}

}
});