¿Cual sería su código?
Debería mostrar dos imágenes de dos
Código del juego del dado.
Código HTML:
Ver original
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <script type="text/javascript"> $(document).ready(function(){ // una vez cargado el archivo, tiramos el primer dado tiroDado(); }); function tiroDado(){ // obtenemos un numero aleatorio entre el 0 y el 5 var num = Math.floor(Math.random() * 6) + 0; // escondemos todas las imagenes $("#tablero img").hide(); // mostramos la imagen aleatoria $("#tablero img").eq(num).fadeIn(); // mostramos el numero en texto $("#ultimoNumero").html(num+1); } </script> <style> #tablero img {display:none;width:167px;height:167px;} </style> </head> <body> <div id="tablero"> <img src="dado1.png"/> <img src="dado2.png"/> <img src="dado3.png"/> <img src="dado4.png"/> <img src="dado5.png"/> <img src="dado6.png"/> </div> </body> </html>