Ver Mensaje Individual
  #3 (permalink)  
Antiguo 20/01/2011, 16:03
Avatar de wolf777
wolf777
 
Fecha de Ingreso: junio-2004
Ubicación: Bolivia
Mensajes: 199
Antigüedad: 19 años, 10 meses
Puntos: 0
Respuesta: jQuery Image Loader & link

Lo resolvi de esta forma pero no se si es la ams adecuada:
Cita:
$(function () {
var images = new Array();
images[0] = 'http://farm4.static.flickr.com/3293/2805001285_4164179461_m.jpg';
images[1] = 'http://farm4.static.flickr.com/3103/2801920553_656406f2dd_m.jpg';
images[2] = 'http://farm4.static.flickr.com/3248/2802705514_b7a0ba55c9_m.jpg';
$("ul#portfolio li").each(function(index,el){
var img = new Image();
$(img).load(function () {
$(this).css('display','none'); // since .hide() failed in safari
$(el).removeClass('loading').append(this);
$(this).fadeIn();
}).error(function () {
$(el).remove();
}).attr('src', images[index]);
});
$("ul#portfolio li").click(
function()
{
window.location = $(this).attr("url");
});

});
A cada Lista <li> le adicione el atributo url='dirección'
al Css le coloque un puntero para que se vea como link
__________________
Do not let The Darknness Get You, to soon...