mardi 12 juillet 2016

Can I order divs randomly at any point on a page using jquery?

Is it possible to place divs on a page in a random position on a page on load?

I would like the page to load up with the divs I have already created in a random position. I dont mean in a random order like 3,5,2,7,9,1,4 etc in a row or column.

More like this example: random images

In the above example the small red and white squares are draggable and the 2 larger ones are pots for the squares to be dragged in to.

Can the red and white smaller squares be randomaly placed?

examples I have previously found seem to explain how to make divs randomaly fade in or change after time to another random image.

I have only been coding a few weeks so bare with me a bit.

Many thanks,




Aucun commentaire:

Enregistrer un commentaire