Ver Mensaje Individual
  #8 (permalink)  
Antiguo 26/01/2014, 12:39
jc1992
 
Fecha de Ingreso: noviembre-2010
Mensajes: 156
Antigüedad: 13 años, 5 meses
Puntos: 0
Respuesta: Problemas con menu animado con jquery

Vale , esta es la función que tengo que llamar , entonces lo he probado y creo que está correcta , creo... , me falta saber llamarla justo cuando presiono el número 1.

Cita:
function prueba2(){
$(document).keydown(function(tecla){
if (tecla.keyCode == 49) {
url = "http://www.google.es";
$(location).attr('href',url);
$('.uno').css({ 'background-color' : 'red' }
);
}else if(tecla.keyCode == 50) {
url = "contacto.html";
$(location).attr('href',url);
$('.dos').css({ 'background-color' : 'blue' });
}else if(tecla.keyCode == 51) {
url = "http://www.hotmail.com";
$(location).attr('href',url);
$('.tres').css({ 'background-color' : 'blue' });
}else if(tecla.keyCode == 52){
url = "http://www.marca.com";
$(location).attr('href',url);
$('.cuatro').css({ 'background-color' : 'green' });
}else if(tecla.keyCode == 53){
url = "http://www.as.com";
$(location).attr('href',url);
$('.cinco').css({ 'background-color' : 'green' });
}else if(tecla.keyCode == 54){
url = "http://www.acb.com";
$(location).attr('href',url);
$('.seis').css({ 'background-color' : 'green' });
}
});
}