📜  jquery 为所选按钮设置 Flash 动画 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:03:08.133000             🧑  作者: Mango

代码示例4
var buttonColours=["red", "blue", "green", "yellow"];
var gamePattern=[];

function nextSequence(){
  var randomNumber = Math.floor(Math.random()*4);
  var randomChosenColour= buttonColours[randomNumber];
  gamePattern.push(randomChosenColour);
  $("#randomChosenColour").fadeOut(100).fadeIn(100).fadeOut(100).fadeIn(100);
 }