Quantcast
Channel: Adobe Community : All Content - Edge Animate
Viewing all articles
Browse latest Browse all 9897

Have divs swap positions on click

$
0
0

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!


Viewing all articles
Browse latest Browse all 9897

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>