Team:Buenos Aires/js/external.js

From 2013.igem.org

var newBg = ["Santi.jpg", "160px-Bsas2012-mario.jpg", "Santi.jpg"];

/* Acá programo en javascript todo lo que quiero que se me cargue con los links externos */ externa = function(){


$(".integrante").css({

        background: 'url(' + newBg[0] + ') no-repeat',
        height: '150px',
        width: '150px',
        overflow:'none'

});

$(".descripcion").css({

        display: 'none',
        height: '350px',
        width: '350px',
        background: '#FFF',
        border: 'solid 1px',
        color: '#000'

});

},

prueba = function(){


/* i is used to loop de array of bacteria images */ var i = 1;

 $(".integrante").hover(function(){

/* I get the original bg */ var bg = $(this).css('background-image');


/* i++; if(i==2) i=0;*/

alert(bg); alert(newBg[i]);

$(this).css({

        background: 'url(' + newBg[i] + ') no-repeat'

});


   },function(){
    $(this).css({

//TODO: CHEQUEAR ESTO DEL BG

        background-image: bg;

});

 });

}