Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var set = Math.floor(Math.random() * 3);
- console.log(set);
- if (set == 0){
- $("#img1").replaceWith("<img src=5.png id=img1/>");
- $("#img2").replaceWith("<img src=2.png id=img2/>");
- $("#img3").replaceWith("<img src=4.png id=img3/>");
- $("#img4").replaceWith("<img src=1.png id=img4/>");
- $("#img5").replaceWith("<img src=8.png id=img5/>");
- $("#img6").replaceWith("<img src=6.png id=img6/>");
- $("#img7").replaceWith("<img src=7.png id=img7/>");
- $("#img8").replaceWith("<img src=3.png id=img8/>");
- $("#img9").replaceWith("<img src=9.png id=img9/>");
- } else if (set == 1) {
- $("#img1").replaceWith("<img src=2.png id=img1/>");
- $("#img2").replaceWith("<img src=7.png id=img2/>");
- $("#img3").replaceWith("<img src=9.png id=img3/>");
- $("#img4").replaceWith("<img src=3.png id=img4/>");
- $("#img5").replaceWith("<img src=5.png id=img5/>");
- $("#img6").replaceWith("<img src=4.png id=img6/>");
- $("#img7").replaceWith("<img src=1.png id=img7/>");
- $("#img8").replaceWith("<img src=6.png id=img8/>");
- $("#img9").replaceWith("<img src=8.png id=img9/>");
- } else if (set == 2) {
- $("#img1").replaceWith("<img src=9.png id=img1/>");
- $("#img2").replaceWith("<img src=4.png id=img2/>");
- $("#img3").replaceWith("<img src=7.png id=img3/>");
- $("#img4").replaceWith("<img src=2.png id=img4/>");
- $("#img5").replaceWith("<img src=1.png id=img5/>");
- $("#img6").replaceWith("<img src=5.png id=img6/>");
- $("#img7").replaceWith("<img src=6.png id=img7/>");
- $("#img8").replaceWith("<img src=8.png id=img8/>");
- $("#img9").replaceWith("<img src=3.png id=img9/>");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement