3 Replies Latest reply on Feb 20, 2014 2:47 PM by resdesign

    Have divs swap positions on click


      Hi, I'll make this short, I've been making a match game, and it works how I would like, but I'd really like for the itmes you match (simple squares with something written on each one) to be randomly placed in 1 of  8 spots when I click on the Start button.  I'd like for all 8 spots to be taken and not for any 2 items to take up the same spot.  I figured the best way to do this would be to create 8 squares the same size as the actual choice squares that sits behind the choice items with no visibility, and then have the 8 items randomly be placed on top of the 8 invisible squares (I wanna do it this way as it is responsive, so to set a specific coordinate would not be ideal).


      I hope that makes sense.  I know enough programming to get by, but this is something that I don't yet know how to handle.  I hope someone can direct me in the direction of what I should do.


      Much thanks!