Advertisement
Guest User

Untitled

a guest
Dec 7th, 2016
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var set = Math.floor(Math.random() * 3);
  2. console.log(set);
  3. if (set == 0){
  4.     $("#img1").replaceWith("<img src=5.png id=img1/>");
  5.     $("#img2").replaceWith("<img src=2.png id=img2/>");
  6.     $("#img3").replaceWith("<img src=4.png id=img3/>");
  7.     $("#img4").replaceWith("<img src=1.png id=img4/>");
  8.     $("#img5").replaceWith("<img src=8.png id=img5/>");
  9.     $("#img6").replaceWith("<img src=6.png id=img6/>");
  10.     $("#img7").replaceWith("<img src=7.png id=img7/>");
  11.     $("#img8").replaceWith("<img src=3.png id=img8/>");
  12.     $("#img9").replaceWith("<img src=9.png id=img9/>");
  13. } else if (set == 1) {
  14.     $("#img1").replaceWith("<img src=2.png id=img1/>");
  15.     $("#img2").replaceWith("<img src=7.png id=img2/>");
  16.     $("#img3").replaceWith("<img src=9.png id=img3/>");
  17.     $("#img4").replaceWith("<img src=3.png id=img4/>");
  18.     $("#img5").replaceWith("<img src=5.png id=img5/>");
  19.     $("#img6").replaceWith("<img src=4.png id=img6/>");
  20.     $("#img7").replaceWith("<img src=1.png id=img7/>");
  21.     $("#img8").replaceWith("<img src=6.png id=img8/>");
  22.     $("#img9").replaceWith("<img src=8.png id=img9/>");
  23. } else if (set == 2) {
  24.     $("#img1").replaceWith("<img src=9.png id=img1/>");
  25.     $("#img2").replaceWith("<img src=4.png id=img2/>");
  26.     $("#img3").replaceWith("<img src=7.png id=img3/>");
  27.     $("#img4").replaceWith("<img src=2.png id=img4/>");
  28.     $("#img5").replaceWith("<img src=1.png id=img5/>");
  29.     $("#img6").replaceWith("<img src=5.png id=img6/>");
  30.     $("#img7").replaceWith("<img src=6.png id=img7/>");
  31.     $("#img8").replaceWith("<img src=8.png id=img8/>");
  32.     $("#img9").replaceWith("<img src=3.png id=img9/>");
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement