0
move an object to random positions using jquery
i'm trying to set up a button that when I click it, it will randomly generate coordinates to move the div square to a different spot using Jquery. Ideas on how I would set this up?
2 Respostas
0
You could do it so, that the element has an absolute positiin, and fixed width, height; and then changing its left to a random number between 0 and 100 - width (%), and the same with height
0
how would you write the code? thats what i’m not sure on.