Forked from: FumioNonaka's jQuery: img要素のランダムな差替え View Diff (14)

Fork
0
Fav
0
View
230
  • Play

Fullscreen

Smart Phone

  • Readme
  • JavaScript 28 lines
  • HTML 6 lines
  • CSS 9 lines

クリックした画像を、配列に入れたパスからMath.random()メソッドでランダムに切り替える。直前に選んだ画像と同じになったときは、関数を再帰呼び出しして重複は避けている。


Exchanging images randomly with an array of paths and Math.random() method. To avoid selecting the same image as the last one recursive call of function is used.

  • jQuery: Exchanging images randomly with recursive call
  • jQuery: Exchanging images randomly with recursive call

play

Complete!

Description What kind of game?

Control Device

jsdo.it websocket controller

Mouse

keyboard

smartphone

Fullscreen

Default Panel

Size

  • Width: px
  • Height: px

code

QR Code

Discussion

Questions on this code?

Tags