The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript make a button move ramndomly on refresh without stacking

  • This topic is empty.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • #44582

    As the title says I`d like to make some buttons move randomly on the page every time the page gets refreshed.I`ve been searching for a few days now and coudn`t find anyting that I could understand, only munbo-junbo php scripts :(.

    Here is the example of what i want to do : .

    I got my script for random background image but i have nothing on the buttons : / .
    I posted the discution in the “js jungle” because I thought that`s the most suitable programming language for what i intend to do. But I`ll use anything! :)

    Please help and thank you in advance!

    Kitty Giraudel

    It shouldn’t be too hard.

    Run a loop randoming position for the current button, save that position in an array then check to be sure the randomed position isn’t used yet. If it’s used, rand again until you got an available position (shouldn’t be too long).


    thanks hugo, but i was expecting more of an example-oriented answer :) .I`m still on the same spot now


    Randomly moving buttons.

    I can’t think of anything more annoying to a visitor. Terrible UX.

Viewing 4 posts - 1 through 4 (of 4 total)
  • The forum ‘JavaScript’ is closed to new topics and replies.