Forums

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
    Posts
  • #44582
    klaudele
    Member

    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 : http://www.hypnohypno.com/ .

    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!

    #134214
    Kitty Giraudel
    Participant

    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).

    #134219
    klaudele
    Member

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

    #134222
    Paulie_D
    Member

    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.